NESTED if Formula

Corleone

Well-known Member
Joined
Feb 2, 2003
Messages
841
Office Version
  1. 365
im trying to get the formula below to give me the desired output
where if the figure in the referenced cell is a negative number
it populated the cell with "Critical"

if its less than 10 but greated than -1 it returns "Warning"

and if > than 10 it returns "OK"

The formula below only seems to recognise 2 of the criteria ie when the cell is a minus number it return "Warning" instead of critical.

=IF(LOCs!J4>10,"OK",IF(LOCs!J4<10,"Warning",IF(LOCs!J4<0,"Critical"))

any help appreciated
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
im trying to get the formula below to give me the desired output
where if the figure in the referenced cell is a negative number
it populated the cell with "Critical"

if its less than 10 but greated than -1 it returns "Warning"

and if > than 10 it returns "OK"

The formula below only seems to recognise 2 of the criteria ie when the cell is a minus number it return "Warning" instead of critical.

=IF(LOCs!J4>10,"OK",IF(LOCs!J4<10,"Warning",IF(LOCs!J4<0,"Critical"))

any help appreciated

The problem is the ORDER that you've placed the IF statements.

Example: Imagine your number is -1. Your formula hits the first IF statement and says "is it over 10? No! Ok, move onto the next if statement. Is it less than 10? YES! Return Warning"

You need to put the Less than 0 statement in front of the less than 10 statement then it should work.

Hope this helps :)
 
Upvote 0
Your condition of < 0 is after the < 10 condition. Whatever is less than 0 is always less than 10, and so the formula will execute only the 2nd IF.

Try

=IF(A1<0,"Critical",IF(A1<10,"Warning","OK"))
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,823
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top