IF Statement

baggas

New Member
Joined
Oct 25, 2005
Messages
28
I am trying to assign a rating for example in an audit a certain score between a range will be allocated.

For example a score between 0 and 0.49 would be a 1A and a score between 0.50 would be 1B etc.

I have used the IF function and it seems ok up to a certain number of IF statements. Is there a limit to the number you can do?? If entered this below.

=IF(F169>10,4, IF(F169<=10,3D, IF(F169<8.99,3C, IF(F169<7.99,3B, IF(F169<6.99,3A, IF(F169<5.99,2D, IF(F169<4.99,2C, IF(F169<,3.99,2B E174(F169<2.99,2A, IF(F169<1.99,"1D", IF(F169<1.49,"1C", IF(F169<0.99,"1B", IF(F169<0.49,"1A")))))))))))))

any help would be appreciated. i seem to get an error roughly half way through?

thanks in advance

Sean.
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi Baggas

You can have a maximum of 7 nested IF statements. To get around this limitation, you need to use a Lookup eg:

=VLOOKUP(A1,D1:E10,2)

Where D1:E10 holds the number boundaries (col D) and col E holds the return values eg "1A" etc.

Make sense?

Richard
 
Upvote 0
hI,

=IF(F169<=10,LOOKUP(F169,{0,0.49,0.99,1.49,1.99,2.99,3.99,4.99,5.99,6.99,7.99,8.99},{"1A","1B","1C","1D","2A","2B","2C","2D","3A","3B","3C","3D"}),4)

HTH
 
Upvote 0

Forum statistics

Threads
1,213,567
Messages
6,114,342
Members
448,570
Latest member
rik81h

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