Formula for multiple selections
-
Hello, need some help with CFF formula for multiple selections. Thanks in advance…
Basic formula for calorie intake:
Men: (10 × weight in kg) + (6.25 × height in cm) – (5 × age in years) + 5
Women: (10 × weight in kg) + (6.25 × height in cm) – (5 × age in years) – 161And the answer from this formula should be multiplied by the number of you physical activity:
x 1.2: If you are sedentary = little to no exercise in a day
x 1.375: If you are slightly active = light exercise/sports 2-3 days/week
x 1.55: If you are moderately active = moderate exercise/sports 4-5 days/week
x 1.725: If you are very active = hard exercise/sports 6-7 days a week
x 1.9: If you are extra active = very hard exercise/sports and physical job OR 2x trainingI know how to create formula with 2 physical activity selection (x1.2 and x1.375) formula is below, but how about adding more selections(x1.55; x1.725; x1.9)? I know that it‘s an easy thing for most IT guys :))
(function(){
if(fieldname9 == ‘laikyti’) return ROUND(fieldname3==’Man’?((fieldname4==’Little activity’?(((10*fieldname2)+(6.25*fieldname10)-(5*fieldname12)+5)*1.2):(((10*fieldname2)+(6.25*fieldname10)-(5*fieldname12)+5)*1.375))):((fieldname4==’Little activity’?((10*fieldname2)+(6.25*fieldname10)-5*fieldname12)-161*1.2):(((10*fieldname2)+(6.25*fieldname10)-(5*fieldname12)-161)*1.375))));
})()The page I need help with: [log in to see the link]
- The topic ‘Formula for multiple selections’ is closed to new replies.