IF not equal to paperback or hardcover, then miscellaneous

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. :slight_smile:

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

1 Like

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"
)

2 Likes

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

Yep, SWITCH probably better

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

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

1 Like

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.