How to use a different formula depending upon a LOOKUP result

Barty

New Member
Joined
Mar 15, 2014
Messages
6
Hi,

I am making a spreadsheet to use on client's to calculate dietary requirements. I am attempting to get one cell to perform two functions, whereby it must lookup the client's gender from another cell, then use this information to identify which formula to use to calculate if the client is at risk and display either "at risk" or "normal".

For females the range is 0.8 to 0.9 (however for the purpose of this you can just use >0.8)
For males the range is 0.9 to 1.0 (or >0.9)

First it needs to identify the gender from cell D7 so I used: (* denotes what excel should do if the result is found true)

=LOOKUP(D7,{"Female","Male"},{*,*})

But when I tried to add in the formula instruction it did not work. What I need it to do from here is identify the client is female, so use the formula >0.8 to identify "At risk" if this is true, or "normal" if this is false.


=LOOKUP(D7,{"Female","Male"},{(IF(D14>=0.8,"At Risk","Normal"),0.9})

help please :(
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
A simple IF can solve it, but I didn't get what you want to do ? You are looking in D7 and if its Male, then what will happen ?
 
Upvote 0
A simple IF can solve it, but I didn't get what you want to do ? You are looking in D7 and if its Male, then what will happen ?

Thanks Shawn.I'll give you some more info...

I have one cell which calculates the client's waist-to-hip ratio and gives a value up to 1.0
beneath that is a cell for classification. i want this cell to lookup D7 and then....

If it is male, then I want it to classify a score above 0.9 as "at risk", anything else "normal"
If it is female, then I want it to classify a score above 0.8 as "at risk", anything else "normal"

does that make more sense?
 
Upvote 0
Hi Barty !

Is this what you looking for:

Patient NameGenderWaist-to-Hips RationFormula
Patient 1Male0.8Normal
Patient 2Male0.91At Risk
Patient 3Female0.75Normal
Patient 4Female0.9At Risk
Patient 5Female1At Risk

<tbody>
</tbody>

Considering the above data from Column A to D, in D2 (from above table's perspective), try:

Code:
=IF(AND(B2="Male",C2>0.9),"At Risk",IF(AND(B2="Female",C2>0.8),"At Risk","Normal"))
 
Upvote 0
Hi Barty !

Is this what you looking for:

Patient NameGenderWaist-to-Hips RationFormula
Patient 1Male0.8Normal
Patient 2Male0.91At Risk
Patient 3Female0.75Normal
Patient 4Female0.9At Risk
Patient 5Female1At Risk

<tbody>
</tbody>

Considering the above data from Column A to D, in D2 (from above table's perspective), try:

Code:
=IF(AND(B2="Male",C2>0.9),"At Risk",IF(AND(B2="Female",C2>0.8),"At Risk","Normal"))


Awesome! Thanks Shawn, that works perfectly!!
 
Upvote 0

Forum statistics

Threads
1,216,487
Messages
6,130,944
Members
449,608
Latest member
jacobmudombe

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