Body Mass Index (BMI) calculations are done on purpose to determine if a person is underweight, normal, overweight, or obese. It is an easy approach to determine the body simply using height and weight. This article will show you how to calculate Body Mass Index (BMI) in Excel.
BMI Calculation
BMI stands for Body Mass Index. The simple use of height and weight to calculate Body Status is a quick and inexpensive method. We can determine whether a person is normal, overweight, underweight, or obese from their BMI results. However, BMI is not a diagnostic tool. The given generic formula is used for BMI calculation.
How to Calculate BMI in Excel: 2 Handy Ways
In the image below, we have a list of people’s names, heights in meters, and weights in kilograms. We want to calculate both their BMI and Body Status simply using their height and weight. Here, we will use two methods to calculate BMI and Body Status for 10 different individuals. In this article, we will use the IF function and Excel VBA code to evaluate BMI and Body Status.
1. Applying IF Function to Calculate BMI in Excel
In this first method, we will calculate Body Mass Index (BMI) using the generic formula of BMI and then their Body Status using the IF function. The following steps are given below.
Steps:
- First, select cell E5. Write down the following formula for the BMI.
=D5/C5^2
- Here, D5 and C5 represent the weight in kilograms and height in meters, respectively.
- Secondly, press Enter and cell E5 will represent the first person’s BMI.
- Thirdly, use the Fill Handle tool and drag it down from cell E5 to E14. Therefore, we get the results of other cells.
- For calculating Body Status, if a person is normal, overweight, or obese, we will show the result by using the IF function in Excel.
- First, select cell F5. Write down the following formula with the IF function.
=IF(E5<=18.5,"Underweight",IF(E5<=24.9,"Normal",IF(E5<=29.9,"Overweight","Obesity")))
- Now, press Enter and cell F5 will represent the first person’s Body Status.
- Thirdly, use the Fill Handle tool and drag it down from cell F5 to F14. Therefore, we get the results of other cells.
Read More: How to Calculate BMI Percentile in Excel
2. Run a VBA Code to Calculate BMI in Excel
The VBA Code implementation is an alternative approach to accomplish the task. Here, applying the VBA Code we will determine the Body Mass Index and Body Status within a very short time. Applying the VBA Code in Excel for calculating BMI and Body Status is very effective in comparison to other methods.
Steps:
- Firstly, go to the Developer tab and then click on the Visual Basic option.
- Here, the Visual Basic Application window will open.
- Then, click on the Insert tab.
- Finally, click on the Module option to create a new module.
- Paste the following VBA code into the Module option.
Sub BMI_Status()
Dim Weight, Height, bmi, x As Range
Weight = "D5:D14"
Height = "C5:C14"
Dim Rng As Range
Set Rng = Range("E5:E14")
For i = 1 To Rng.Rows.Count
Rng.Cells(i, 1) = Rng.Cells(i, 0) / ((Rng.Cells(i, -1)) ^ 2)
If Rng.Cells(i, 1) <= 15 Then
Rng.Cells(i, 2) = "Under Weight"
ElseIf Rng.Cells(i, 1) > 15 And Rng.Cells(i, 1) <= 25 Then
Rng.Cells(i, 2) = "Optimum weight"
Else
Rng.Cells(i, 2) = "Over weight"
End If
Next i
End Sub
- Finally, press F5 to run the program.
- While writing the Excel VBA Code for determining BMI and Body Status, you must be careful about your input variables and syntax.
- While using the IF function, you must make sure how much Body Status category you will use.
Read More: How to Create a Body Mass Index Calculator in Excel Using VBA
Download Practice Workbook
You may download the following Excel workbook for better understanding and practice yourself.
Conclusion
In this article, I’ve covered 2 practical ways to determine Body Mass Index (BMI) in Excel. I sincerely hope you enjoyed and learned a lot from this article. Additionally, if you want to read more articles on Excel, you may visit our website. If you have any questions, comments, or recommendations, kindly leave them in the comment section below.