July 20, 200421 yr 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
July 20, 200421 yr (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 )
July 20, 200421 yr Author 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!!
July 20, 200421 yr For the most part, yes. But it depends on the setup as to what will work best for a given situation.
Create an account or sign in to comment