Filtering By Type - If/OR?

#1

I have a database of exercises and am trying to classify types of exercises. For example, Barbell Squat and Bench Press = Weights, while Running and Stair Master = Cardio. The problem that I’m having is with OR statements. I want to say something like this:

IF {Exercise Name} = OR(Bench Press, Squat), “Weights”, "Cardio)

I’ve tried about 100 different ways to do this and am always getting incorrect results. I’m basically trying to group exercises by muscle group so that I can graph different sets of data. Any and all help is appreciated. Thanks!

#2

First off, welcome to the forum, Chuck!

This revision of your example get you what you want:

IF(OR({Exercise Name}="Bench Press", {Exercise Name}="Squat"), "Weights", "Cardio")

When checking several conditions using OR, each condition to be tested must be inside the OR function. Airtable tests each condition to determine if it is True or False. If any are True, it feeds True to the surrounding IF; otherwise it returns False. The IF function then does its thing based on that result.

1 Like
#3

Thanks Justin! Wasn’t sure if what I wrote made sense last night after staring at my screen for a couple of hours. Hope I can contribute one day too…