Dodgy IF Statement

godders453

New Member
Joined
Mar 31, 2017
Messages
2
Hi all,

This is my first post, I wonder if anyone could assist? - I'm trying to create a worksheet that calculates a person's Resting Metabolic Rate (RMR), based on criteria of:
1) Gender
2) Age Range
3) Weight in kg
Once the user determines these values, depending on what they answered, the RMR calculator needs to follow one of the following two equation examples:
Male, Aged 10-18: 17.5 * Weight in kg + 651 = RMR
or
Female, Aged 10-18: 12.2 * Weight in kg + 749 = RMR

I have created a statement for the two examples above:
=IF(D31="Male",IF(D33="10-18",C30,IF(D31="Female",IF(D33="10-18",C35,""))))

The first half (Male) calculates fine. However, the second half (Female) returns "FALSE" in my calculation cell. If I remove the Male part of the statement and use only the Female part, it works fine. The two together don't seem to want to play.

My question(s), does anyone see what I'm trying to achieve by adding the Male and Female variables in the same statement, if so, can it be achieved like this. If not, how do I do it?

Hope that all makes sense!

Many thanks :)
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
I think your bracketing is slightly off, try this:
Code:
=IF(D31="Male",IF(D33="10-18",C30),IF(D31="Female",IF(D33="10-18",C35,"")))

Is there any need to include the Age Range in the IF statement if they are both the same?

Caleeco
 
Last edited:
Upvote 0
Maybe this

Code:
=IF(AND(D31="Male",D33="10-18"),C30,IF(AND(D31="Female",D33="10-18"),C35,""))
 
Upvote 0

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

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