Excel 2019 Bible

(singke) #1

Part II: Working with Formulas and Functions


With this table, you can get a quick view of the conversions from one unit of measure to
another. You can see that it takes 48 teaspoons to make a cup, 2.4 cups to make an English
pint, and so forth.

The CONVERT function requires three arguments: a number value, the unit you’re convert-
ing from, and the unit you’re converting to. For instance, to convert 100 miles into kilome-
ters, you can enter this formula to get the answer 160.93:

=CONVERT(100,"mi", "km")

You can use the following formula to convert 100 gallons into liters. This will give you the
result 378.54.
=CONVERT(100,"gal", "l")

You’ll notice the conversion codes for each unit of measure. These codes are specific and
must be entered exactly how Excel expects to see them. Entering a CONVERT formula using
gallon or GAL instead of the expected gal will return an error.

Luckily, Excel provides a tooltip as you start entering your CONVERT function, letting you
pick the correct unit codes from a list.

You can refer to Excel’s help files on the CONVERT function to get a list of valid units of
measure conversion codes.

Once you have the codes in which you are interested, you can enter them in a matrix-style
table like the one you saw in Figure 10.13. In the top-left cell in your matrix, enter a for-
mula that points to the appropriate conversion code for the matrix row and matrix column.

Be sure to include the absolute references necessary to lock the references to the conver-
sion codes. For the codes located in the matrix row, lock to the column reference. For the
codes located in matrix column, lock the row reference.
=CONVERT(1,$E4,F$3)

At this point, you can simply copy your formula across the entire matrix.
Free download pdf