As you can see, the code for the function is straightforward. Let us use this function in
our Excel worksheet by typing the following formula in cell A1:
=BMI(200, 73)
As soon as you enter the formula, Excel will display 26.38699 in cell A1, the BMI of
a person who weighs 200 pounds and is 73 inches tall.
Since BMI is declared a Public function, Excel includes it in the list of built-in func-
tions, and you can access it just like any other Excel function, through the Insert Function
dialog box as shown in Figure 11.15
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.