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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

baggas

New Member
Joined
Oct 25, 2005
Messages
28
ahh just seen a typo in my formula. it actually works fine up to the 2B.
 

Richard Schollar

MrExcel MVP
Joined
Apr 19, 2005
Messages
23,707
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
 

Krishnakumar

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

Forum statistics

Threads
1,136,508
Messages
5,676,270
Members
419,617
Latest member
Shane50GT

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
Top