Help

Logical operators within the "IF" function

Topic Labels: Formulas
643 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Lev_Korotich
5 - Automation Enthusiast
5 - Automation Enthusiast

I have two values “PUt” and “SRt”

With different values of these fields I need to output different “Profiles”.

When I write a formula to compare these numbers, I get the wrong answer from the formula.

Values:
Снимок экрана 2022-05-26 в 13.05.22

This is my formula:
Снимок экрана 2022-05-26 в 13.07.04
Снимок экрана 2022-05-26 в 13.07.17
Снимок экрана 2022-05-26 в 13.07.25

Logically, the formula should select “Profile 6”

But the cell shows “Profile 5”.

2 Replies 2

Hm, I don’t think that you can do [NUMBER] < [VALUE] < [NUMBER], actually

I think you’ll need to separate them each out into single lines, e.g.

IF(
  AND(
    46 < SRt,
    SRt < 55,
    46 < PUt,
    PUt > 54
  ),
  'Profile 5',
  IF(
    AND(
      46 < SRt,
      SRt < 55,
      PUt > 56
    ),
    'Profile 6'
  )
)

You can view it here. To view the formula, duplicate the base by clicking the title of the base at the top of the screen, then the three horizontal dots on the right, and then the “Duplicate Base” button.

Didn’t even think of that decision :grinning_face_with_sweat:

Thanks so much, buddy!