mikespe Posted July 20, 2004 Posted July 20, 2004 I am probably overlooking something but for the life of me I cannot figure out how to put an If statement into a calculation...here is my calculation so far: 655 + (9.6 * (weight / 2.2)) + (1.7 * (height * 2.54)) - (4.7 * age) Now I have another field that is a value list called Activity Level. I need the choices in the list to equal a numerical value. So Sedentary=1.2 Light=1.375 Moderate=1.55 Very=1.725 Extra=1.9 I need the result of the above calculation to be multiplied by the activity level. First how do I make the value list choices equal a numerical value and then how do I finish my calculation with the If statement (if that's what I should be using?). Thx
-Queue- Posted July 20, 2004 Posted July 20, 2004 (655 + 9.6 * (weight / 2.2) + 1.7 * height * 2.54 - 4.7 * age) * Case( ActivityLevel = "sedentary", 1.2, ActivityLevel = "light", 1.375, ActivityLevel = "moderate", 1.55, ActivityLevel = "very", 1.725, ActivityLevel = "extra", 1.9 )
mikespe Posted July 20, 2004 Author Posted July 20, 2004 EXCELLENT!! So the Case function is in the Logical group....now is this always the format I will use whenever trying to "convert" text to a numerical value? Thank you for your VERY fast reply Queue!!
-Queue- Posted July 20, 2004 Posted July 20, 2004 For the most part, yes. But it depends on the setup as to what will work best for a given situation.
Recommended Posts
This topic is 7500 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now