Help

Re: IF not equal to paperback or hardcover, then miscellaneous

Solved
Jump to Solution
1245 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Alba_Machado2
7 - App Architect
7 - App Architect

Hi AirTable Geniuses!

I’m fairly new at this, but I’m hoping I could create a formula field that auto-generates an Amazon-friendly cell for each book record my old Homebase book inventory. Homebase allows for an infinite number of book binding descriptors, but the only ones on Amazon that work for my books are Hardcover, Paperback, and Miscellaneous. So my AirTable has two binding fields: HOMEBASE BINDING and AMAZON BINDING. The first will just be copied from my old database. I think the second, though, needs a formula that starts like this:

IF({HOMEBASE BINDING}=“Hardcover”,“Hardcover”,IF({HOMEBASE BINDING}=“Paperback”,“Paperback”,IF({HB BINDING}!=

This is where I get stuck. How can I tell my AirTable table that if HOMEBASE BINDING does not equal either “Hardcover” or “Paperback”, my AMAZON BINDING field should say “Miscellaneous”?

I’d be mighty grateful for some assistance with this one! It would mean not having to comb through 25,000 records. :slightly_smiling_face:

1 Solution

Accepted Solutions
Jeremy_Oglesby
14 - Jupiter
14 - Jupiter

Hi @Alba_Machado2,

Since you are only checking the value of one field over and over again here, you’ll find it much easier to make use of the SWITCH() function instead. The SWITCH() function lets you set a default value if none of the other matches are hits:

SWITCH(
   {HOMEBASE BINDING},
   "Hardcover", "Hardcover",
   "Paperback", "Paperback",
   "Miscellaneous"
)

CleanShot 2020-09-15 at 09.55.11

See Solution in Thread

6 Replies 6

Hi @Alba_Machado2 - you can just do this:

IF( {HOMEBASE BINDING} = 'Hardcover', 'Hardcover', IF( {HOMEBASE BINDING} = 'Paperback', 'Paperback', 'Miscellaneous' ) )

The final option is shown if it is neither hardback or paperback

Jeremy_Oglesby
14 - Jupiter
14 - Jupiter

Hi @Alba_Machado2,

Since you are only checking the value of one field over and over again here, you’ll find it much easier to make use of the SWITCH() function instead. The SWITCH() function lets you set a default value if none of the other matches are hits:

SWITCH(
   {HOMEBASE BINDING},
   "Hardcover", "Hardcover",
   "Paperback", "Paperback",
   "Miscellaneous"
)

CleanShot 2020-09-15 at 09.55.11

Oops… sorry @JonathanBowen. Your response didn’t show until I hit reply and my page updated.

Yep, SWITCH probably better

No problem :slightly_smiling_face: Think yours is the better solution!

Perfect! Thanks so much, Jeremy and Jonathan! (Just realized there were two of you!) :green_heart: