How to Calculate BMI in Excel (2 Handy Ways)

Get FREE Advanced Excel Exercises with Solutions!

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.

Handy Ways to Calculate BMI in Excel


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.

Handy Ways to Calculate BMI in Excel


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.

Handy Ways to Calculate BMI in Excel

  • Secondly, press Enter and cell E5 will represent the first person’s BMI.

Handy Ways to Calculate BMI in Excel

  • Thirdly, use the Fill Handle tool and drag it down from cell E5 to E14. Therefore, we get the results of other cells.

Sample Data

  • 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")))
Sample Data
  • Now, press Enter and cell F5 will represent the first person’s Body Status.

Sample Data

  • Thirdly, use the Fill Handle tool and drag it down from cell F5 to F14. Therefore, we get the results of other cells.

Sample Data


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.

Sample Data

Steps:

  • Firstly, go to the Developer tab and then click on the Visual Basic option.

Handy Ways to Calculate BMI in Excel

  • 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.

Handy Ways to Calculate BMI in Excel

  • 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

Handy Ways to Calculate BMI in Excel

  • Finally, press F5 to run the program.

Handy Ways to Calculate BMI in Excel


Notes:
  • 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.

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.


<< Go Back to BMI | Formula List | Learn Excel

What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.
Bishawajit Chakraborty
Bishawajit Chakraborty

Bishawajit Chakraborty, a Rajshahi University of Engineering & Technology graduate with a B.Sc. in Mechanical Engineering, has been associated with ExcelDemy since 2022. Presently, he is a content developer, specializing in Excel Power Query, Data Analysis and VBA. It is worth mentioning that he has authored more than 90 articles on VBA content development. His profound interest lies in the fields of data analytics and data science. He possesses expertise in VBA, Power BI, machine learning, and Python... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo