Method 1 – Using the CONVERT Function to Convert Units in Excel
1.1. Converting Units in a Single Cell
Convert the Temperature from Celsius to Fahrenheit:
Step 1: Choose a Cell to Enter the Command
- Select the D5.
- Enter the formula:
CONVERT(C5, “C”, “F”)
C5 is the Temperature (Celsius), “C” and “F” are the short form of Celsius (from_unit argument) and Fahrenheit (to_unit argument).
Step 2: Get the Results
- Press ENTER.
The temperature is converted to Fahrenheit.
1.2. Converting Units in Multiple Cells
Step 1: Enter the Command
- Select D5.
- Enter the formula:
CONVERT(C5, “C”, “F”)
Step 2: Display the Results
- Press ENTER.
- Drag down the Fill Handle to see the result in the rest of the cells.
This is the output.
Consider the dataset below:
- Use the CONVERT function to convert the Distance from kilometers to miles:
Step 1: Enter the Arguments
- Select D5 and enter: CONVERT.
- Enter the formula:
CONVERT(D5, “km”, “mi”)
D5 refers to Distance (Kilometers), “km” and “mi” are the short form of Kilometer (from_unit argument) and Mile (to_unit argument).
Step 2: Show the Results
- Press ENTER.
This is the output.
- Drag down the Fill Handle to see the result in the rest of the cells.
Method 2 – Preparing a Conversion Matrix to Convert Units
This is the sample dataset.
Steps:
- Enter a numerical value in C15. Here, 100.
Excel automatically generates a table showcasing the equivalent of 100 teaspoons in different units.
Read More: Convert Cubic Feet to Cubic Meters in Excel
Method 3 – Applying VBA Code to Convert Units in Excel
Step 1: Open Visual Basic
- Go to the Developer tab.
- Select Visual Basic.
Step 2 – Open a Module and Run the Code
- Go to Insert and click Module.
Sub Convert_VBA()
Dim k As Integer
For k = 5 To 14
Cells(k, 4).Value = Application.WorksheetFunction.Convert(Cells(k, 3).Value, "C", "F")
Next k
End Sub
- Copy the code into the window.
- Click Run and close the window.
- Go back to the spreadsheet.
This is the output.
Things to Remember
- The Excel CONVERT function is case-sensitive.
- It displays the #N/A error if the units are inconsistent.
- It displays the #NAME? error if it is unable to recognize the text string.
Download Practice Workbook
Related Articles
- How to Convert Kg to Lbs in Excel
- Convert Millimeters (mm) to Inches (in) in Excel
- How to Convert Square Feet to Square Meters in Excel
- Convert MM to CM in Excel
- How to Convert Inches to Square Feet in Excel
- Converting CM to Inches in Excel
- How to Convert CM to Feet and Inches in Excel