Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculation help

Status
Not open for further replies.

5835

Technical User
Jun 10, 2003
23
US
Hi guys,
I need some help with calculations. heres the scenario:
BMI = (weight in kg)/ (height in meters)squared
i have a these fields : BMI, Height(in inches) and Weight( in lbs).
to calculate weight in kg, you take the weight and divide by 2.2
to calculate the height in meters, you take the hieght and divide by 39.37
This is what i tried but it did not work:
Round((WEIGHT / 2.2) / ((HEIGHT / 39.37) *(HEIGHT / 39.37)))

thanks
 
How did it not work? If you used exactly that expression, it should have given you an error message. Try -
Round((WEIGHT / 2.2) / ((HEIGHT / 39.37) *(HEIGHT / 39.37)), 2)


Cheers,
Paul J.
 
Thanks Paul! it worked great
one question though, what was the last "2" for?
 
Sorry for the delay. I've been a bit busy.
Look at this -
Round (MessyCalulation, 2)
It rounds the result to 2 decimal places.

Cheers,
Paul J.
 
Thanks a lot Paul,
You are a big help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top