HELP! Using IF Function for a range of values

RedllowFenix

New Member
Joined
Oct 5, 2017
Messages
18
Hi there!

Trying to figure out how I'd go about writing an IF formula where I have the following information:

Goal:
assign a different range of values whether is man or woman.

Man (%)

Atlhetic <=3
Fitness >=3.1 and <=8
Active >=8.1 and <=12
Normal >=12.1 and <=15
Overweight >=15.1 and <=20
Obesity >=20.1 and <=28
Morbid obesity >=28.1

Woman (%)

Atlhetic <=5
Fitness >=5.1 and <=10
Active >=10.1 and <=14
Normal >=14.1 and <=17
Overweight >=17.1 and <=22
Obesity >=22.1 and <=30
Morbid obesity >=30.1

This is how I tried:

=IF(L9="M",IF(M9<=3,"Athletic",IF(AND(M9>=3.1,M9<=8),"Fitness",IF(AND(M9>=8.1,M9<=12),"Active",IF(AND(M9>=12.1,M9<=15),"Normal",IF(AND(M9>=15.1,M9<=20),"Overweight",IF(AND(M9>=20.1,M9<=28),"Obesity",IF(M9>=28.1,"Morbid Obesity",IF(L9="W",IF(M9<=5,"Athletic",IF(AND(M9>=5.1,M9<=10),"Fitness",IF(AND(M9>=10.1,M9<=14),"Active",IF(AND(M9>=14.1,M9<=17),"Normal",IF(AND(M9>=17.1,M9<=22),"Overweight",IF(AND(M9>=22.1,M9<=30),"Obesity",IF(M9>=30.1,"Morbid Obesity",""))))))))))))))))


When I type the value "H" the formula works but when I type "W" any result is FALSE.

Any assistance would be greatly appreciated.

Thanks!


 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
=IF(L9="M",IF(M9<=3,"Athletic",IF(AND(M9>=3.1,M9<=8),"Fitness",IF(AND(M9>=8.1,M9<=12),"Active",IF(AND(M9>=12.1,M9<=15),"Normal",IF(AND(M9>=15.1,M9<=20),"Overweight",IF(AND(M9>=20.1,M9<=28),"Obesity",IF(M9>=28.1,"Morbid Obesity",""))))))),IF(L9="W",IF(M9<=5,"Athletic",IF(AND(M9>=5.1,M9<=10),"Fitness",IF(AND(M9>=10.1,M9<=14),"Active",IF(AND(M9>=14.1,M9<=17),"Normal",IF(AND(M9>=17.1,M9<=22),"Overweight",IF(AND(M9>=22.1,M9<=30),"Obesity",IF(M9>=30.1,"Morbid Obesity","")))))))))

I ended the IF M, and after ran an IF W
 
Upvote 0
=IF(L9="M",IF(M9<=3,"Athletic",IF(AND(M9>=3.1,M9<=8),"Fitness",IF(AND(M9>=8.1,M9<=12),"Active",IF(AND(M9>=12.1,M9<=15),"Normal",IF(AND(M9>=15.1,M9<=20),"Overweight",IF(AND(M9>=20.1,M9<=28),"Obesity",IF(M9>=28.1,"Morbid Obesity",""))))))),IF(L9="W",IF(M9<=5,"Athletic",IF(AND(M9>=5.1,M9<=10),"Fitness",IF(AND(M9>=10.1,M9<=14),"Active",IF(AND(M9>=14.1,M9<=17),"Normal",IF(AND(M9>=17.1,M9<=22),"Overweight",IF(AND(M9>=22.1,M9<=30),"Obesity",IF(M9>=30.1,"Morbid Obesity","")))))))))

I ended the IF M, and after ran an IF W


You are the boss!! Thank you!! The issue was in the parenthesis ffs
 
Upvote 0

Forum statistics

Threads
1,223,723
Messages
6,174,121
Members
452,545
Latest member
boybenqn

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