Skip to main content
Solved

Nested IF, AND/OR

  • September 30, 2022
  • 4 replies
  • 85 views

Forum|alt.badge.img+2

Hi,

I’m struggling with some nested IF, AND and OR formulas.
I’m trying to find if a value is within a range of numbers, and is a multiple of 5.

For the range, I have the formula:

IF(Value A >= 90,"Good", IF(Value A <= 150, "Bad")) <<This works

To check if Value A is a multiple of 5, I have the formula:

IF(OR(RIGHT("" & Value A,1) =0, RIGHT("" & Value A,1)=5),"Good", "Bad") << this works

The part I am struggling with is combining them together so that:
If Value A is between 90-150 and is a multiple of 5 then “Good”, otherwise “Bad”

Any ideas?

Thanks,
Scott

Best answer by kuovonne

IF(
  AND(
    {Value A} >= 90,
    {Value A} <= 150,
    MOD( {Value A}, 5) = 0
  ),
  "Good",
  "Bad"
)

4 replies

kuovonne
Forum|alt.badge.img+29
  • Brainy
  • Answer
  • September 30, 2022
IF(
  AND(
    {Value A} >= 90,
    {Value A} <= 150,
    MOD( {Value A}, 5) = 0
  ),
  "Good",
  "Bad"
)

Forum|alt.badge.img+2
  • Author
  • Known Participant
  • September 30, 2022
IF(
  AND(
    {Value A} >= 90,
    {Value A} <= 150,
    MOD( {Value A}, 5) = 0
  ),
  "Good",
  "Bad"
)

Thanks for your response @kuovonne however this formula returns ‘Bad’ for all values.


kuovonne
Forum|alt.badge.img+29
  • Brainy
  • September 30, 2022

Thanks for your response @kuovonne however this formula returns ‘Bad’ for all values.


Oops. That should be MOD() = 0 I edited it in my previous post.


Forum|alt.badge.img+2
  • Author
  • Known Participant
  • October 3, 2022

Oops. That should be MOD() = 0 I edited it in my previous post.


That worked, thanks!