# How to convert CM to inches in Microsoft Excel

1 inch is equivalent to 2.54 centimeters. In other words, 1 centimeter is equivalent to 0.3937 inches. Knowing these values, you can easily create a calculator in Excel to help you convert centimeters to inches and vice versa.

## Methods to convert CM to Inches in Excel

Let’s look at a few methods which you can use to convert centimeters to inches and vice versa.

### Use division to convert CM to Inches

Here are the steps

1. Pick a cell where you want the conversion to take place or the results to appear

2. Type in the following formula =reference to a cell with CM/2.54

3. Press the Enter Key on your keyboard to apply the formula

4. To convert the remaining cells to inches, double-click on the fill handle or drag at down

### Use the multiplication method to convert Inches to centimetres

1. Select a cell where you want the result to appear

2. Type this formula: =the reference cell with inches*2.54

3. Press Enter to apply the formula

As you can see from the image above, when you convert 20 inches to CM using Excel, you get 50.8 centimetres.

4. Drag the fill handle or double-click on it to convert the remaining inches to CM automatically

### Use convert function

The convert function allows users to change units to other units. This formula makes it simple instead of multiplying or dividing. You just select the target value, then select the current unit and your target unit. Here are the steps.

1. Write all the values you want to convert in one column

2. Type the following formula into the adjacent cell

=CONVERT(B5,”cm”,”in”)

Convert is the function facilitating the conversion. B5 is the cell holding the Value in CM, “cm” for the unit that B5 is in. Lastly, “in” stands for the target unit.

3. Press enter to convert cell B5 to inches

4. To apply to the rest of the cells, drag down the fill handle or double-click on it.

## Excel CM to Inches Converter

Use the following calculator to convert any number to Inches.

All you need to do is type your value in centimeters in Cell B5, and the results in inches will be displayed in D5.

### Use VBA Macro to convert CM to inches in Excel.

VBA Macro are small applications that run in Excel. You can write VBA code to achieve a lot of possibilities in Excel. Here is how to use VBA to convert Cm to inches in Excel

1. Open a blank Excel spreadsheet

2. Enter your CM values in any cell in Column A

3. Open the VBA editor by following using the shortcut Alt+F11. Alternatively, you can open the VBA editor by clicking on the Developer Tab, then Visual Basic.

4. Click on the insert tab, then choose Module.

5. Copy and paste the code below into the editor

``````Sub ConvertCmToInches()
Dim ws As Worksheet
Dim lastRow As Long
Dim cmRange As Range
Dim inchRange As Range
Dim cell As Range

' Set the worksheet object
Set ws = ThisWorkbook.Worksheets("Sheet1") ' Replace "Sheet1" with your actual sheet name

' Find the last row in column A
lastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row

' Set the range for column A and column B
Set cmRange = ws.Range("A1:A" & lastRow)
Set inchRange = ws.Range("B1:B" & lastRow)

' Convert values from cm to inches
For Each cell In cmRange
If IsNumeric(cell.Value) Then
inchRange(cell.Row, 1).Value = cell.Value * 0.393701
End If
Next cell

' Clean up
Set ws = Nothing
Set cmRange = Nothing
Set inchRange = Nothing
Set cell = Nothing
End Sub
``````

6. Replace “Sheet1” in the code with the name of your actual worksheet where you want to perform the conversion (e.g., “Sheet2”).

7. Click the Run Button

8. The VBA code will convert to inches and display the answer to the adjacent cell in Column B.