Convert cell contents from millimeters to inches

Tosty

Board Regular
Joined
May 5, 2005
Messages
80
Good morning. I have an Excel spreadsheet that was sent to me that contains dimensions in millimeters, but my boss would prefer that the contents were in inches. Is there an easy way to convert the contents of all the cells from millimeters to inches or format them so they change to inches?

I know I can insert parallel columns and put a formula in each cell corresponding to the cell next to it like "=(B2/25.4)" which will convert the contents of B2 to inches, but it is time-consuming and I was hoping their might be a simpler method. Thank you in advance for any assistance you can provide.

Respectfully,
Tosty
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Thanks for the reply Peter. That's what I am currently doing, I was just hoping for a more "global" solution to format all the cells at once.

Best regards,
Tosty
 
Upvote 0
Try

Code:
Sub mmtoinch()
Dim LR As Long, i As Long
LR = Range("B" & Rows.Count).End(xlUp).Row
For i = 2 To LR
    With Range("B" & i)
        .Value = .Value / 25.4
    End With
Next i
End Sub
 
Upvote 0
How about, entering 25.4 in a blank cell.

Copy this cell.

Highlight the metric cells.
Edit, Paste Special, Check Divide

None of these solutions will in and of themselves format the results in feet Inches. Just feet with a decimal for the remainder.
 
Upvote 0
VoG & PA HS Teacher,

Thank you both for your suggestions. Since I am completely unfamiliar with Visual Basic I will probably use PA HS Teacher's solution. It worked well on a couple test cells I tried. The only additional thing I'll have to do is to format the cells after I convert them to include only 3 decimal places, as it takes it out too many decimal places. I tried formatting them to 3 decimal places before I converted them, but the formatting didn't hold. Other than that it seems to do what I need it to do. Thank you both for your kind attention, it is much appreciated!

Best regards,
Tosty
 
Upvote 0

Forum statistics

Threads
1,224,551
Messages
6,179,473
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top