Nested If Formula Problem

K Jenkins

New Member
Joined
Oct 10, 2018
Messages
7
Hi all,

I have a problem with a nested if formula where what I need is a number to appear i a column depending on the numbers founds in another column.

I think I have something wrong in the formula because it does not work like that.
If someone could help me it would be much appreciated.

The formula looks like this.
=IF($G3>=100;$L$4;IF($G3>=200;$L$5;IF($G3>=300;$L$3;IF($G3>=600;$L$6;IF($G3>=700;$L$7;IF($G3>=400;$L$4))))))

Thanks.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi, you need to re-order your nested IF() functions so the largest test is first (i.e. ,G3>=700) and the rest run in descending order - at the moment, the first test (i.e. ">= 100") also captures all the preceding tests.

Here is an alternative you can also try.

=CHOOSE(MATCH($G3,{100,200,300,400,600,700}),$L$4,$L$5,$L$3,$L$4,$L$6,$L$7)
 
Last edited:
Upvote 0
When you're checking >= you have to start with the largest number because if it is more than 700 it will surely be more than 200.
That's why you get wrong results.
L4 is returned in 2 cases, your data seems quite scattered but this has nothing to do with the formula. Also in the last case there's no value fir the false case.
 
Upvote 0
Hi all,

I have a problem with a nested if formula where what I need is a number to appear i a column depending on the numbers founds in another column.

I think I have something wrong in the formula because it does not work like that.
If someone could help me it would be much appreciated.

The formula looks like this.
=IF($G3>=100;$L$4;IF($G3>=200;$L$5;IF($G3>=300;$L$3;IF($G3>=600;$L$6;IF($G3>=700;$L$7;IF($G3>=400;$L$4))))))

Thanks.

you got the order of the IFs not quite right, try this

=if($G3>=700;$L$7;IF($G3>=600;$L$6;IF($G3>=400;$L$4;IF($G3>=300;$L$3;IF($G3>=200;$L$5;IF($G3>=100;$L$4;"?"))))))

fill in the "?" when <100
 
Upvote 0
Thanks for the so fast replies with so many great info and for the alternative!!!!!:)
Now it works!:):)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,886
Messages
6,122,093
Members
449,064
Latest member
Danger_SF

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