NESTED if Formula

Corleone

Well-known Member
Joined
Feb 2, 2003
Messages
837
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

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
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,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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