Excel IF formula, criteria negative percentage values

kevvyb

New Member
Joined
Jun 7, 2013
Messages
6
Hi

I am using this formula on a 'helper column' (G) to try to produce 3 values, G, R and A on which I want to apply conditional formatting traffic light icons.

All would be well if one of the criteia in my formula was not a negative percentage value: =IF(H32>=15%,"G",IF(H32<=15%,"A",IF(H32<-15%),"R","")))
It works apart from the last nested IF statement which does not seem to be recognised.

excel001.JPG


The cells with the values it is using are generated from this formula to produce percentages: =IFERROR((E32-C32)/C32,"0.00%")*-1
So it too has a negative but I have tried all sorts of permuations in case that was it.

excel002.JPG


Is what I am trying to do impossible or is there another way to do it?

Than ks in advance for any help.
 

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
How about
Excel Formula:
=IF(H32>=15%,"G",IF(H32<-15%,"R","A"))
 
Upvote 0
The order of your IF clauses is not correct. Since -15% is also less than 15%, it will hit the second one and never get to the third.

There are a number of ways of structuring these.
1. If only 3 conditions, check the two ends, and then everything left in the middle would be your third (like the formula Fluff posted).
2. Go in ascending or descending order (i.e. If more than your biggest value, if more than your second largest value, etc. or If less than your smallest value, if less than your second smallest value, etc).
3. Use and "AND" clause to define and check the limits of your middle intervals, i.e. If more than your biggest value, if more than your second biggest value AND less than your biggest value, etc).

If you define the conditions in ascending/descending order, then you do not need to mess around with AND clauses, because Excel will stop evaluating the formula once the first true condition is met.
 
Upvote 0

Forum statistics

Threads
1,215,228
Messages
6,123,747
Members
449,118
Latest member
kingjet

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