# Stringing together multiple 'if's

1. ## Stringing together multiple 'if's

I have this =IF(F3=15.5,"D")
If want it to check if f3 is a certain number, if so display 'd'. That works. But then I want it to also check if f3=13.5, and if so display 'p'. So on and so forth. So basically, sting together a bunch of checks like that, where if it's a certain number, it displays a certain letter.

2. Hi,

It depends a lot on ...
and so on ...
Beyond 7 nested If's there is limit ...
Quite often, when facing too many if's the solution is using a vlookup() function ...

3. I won't be going beyond 7. So how would I nest, lets say 5?

4. see Chip's explanation ...
http://www.cpearson.com/excel/nested.htm

5. Thanks!

6. I have this =IF(F3=15.5,"D")
If want it to check if f3 is a certain number, if so display 'd'. That works. But then I want it to also check if f3=13.5, and if so display 'p'.
If you're looking for:15.5, 13.5, 11.5, 9.5, 7.5
and want to display, respectively: D, P, Q, Z, M

=IF(F3=15.5,"D",IF(F3=13.5,"P",IF(F3=11.5,"Q",IF(F3=9.5,"Z", IF(F3=7.5,"M","")))))

----------------
Note: This takes into account if there is more than just those 5 values in F3 possible. For any value in F3 other than those specified, it will return a blank cell. If only those five values would ever been in F3, then the formula can be shortened a little to:

=IF(F3=15.5,"D",IF(F3=13.5,"P",IF(F3=11.5,"Q",IF(F3=9.5,"Z","M"))))

This is because if the value isn't 15.5, 13.5, 11.5 or 9.5, it will be assumed that the value is 7.5, and will return "M".
----------------

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1