Nested IF formula

CLH2018

New Member
Joined
Sep 12, 2018
Messages
6
Hi,

I have a number of nested IF formulas that aren't working and I feel like I've tried every variation but still can't craack it! Any help would be gratefully received!

SO in the cell next to the formula, I have 3 options and depending on what is selected, I then want it to generate a number.

So if 'Low' is chosen, the score is 1, if medium is chosen, the score is 2 and if high then the score is 3.

At the moment, my formula is this:

=IF(S4>="LOW","1",IF(S4>="Medium","2",IF(S4>="High","3")))

It generates correctly for Low and High but not medium! I'm not sure where I'm going wrong.

Thanks so much
 
You've solved it, it's the spaces! Thank you! I've just wasted 2 hours trying all kinds of different ways!
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
You are welcome.

If they are regular spaces, you can change the S4 references to TRIM(S4) in your formula to drop the extra spaces.
If the data is coming from the web or some other source, they could be special spaces, which TRIM won't work on.
If the spaces are on the end, you could just check the first three characters of S4, i.e. LEFT(S4,3)="Med"
 
Last edited:
Upvote 0
Hi,

You can also simply use MATCH.

3 variation of the same formula:

Use T4 formula if you Always have one of the 3 values (Low, Medium, High)
Use T5 formula if you've Not removed the "Spaces" in subject cell
Use T6 formula if the subject cell may be Blank or contain a value Other than Low, Medium, High


Book1
ST
4Low1
5Medium2
6Hot 
Sheet249
Cell Formulas
RangeFormula
T4=MATCH(S4,{"Low","Medium","High"},0)
T5=MATCH(TRIM(S5),{"Low","Medium","High"},0)
T6=IFERROR(MATCH(S6,{"Low","Medium","High"},0),"")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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