inches to mm
inches to mm
(OP)
Hi everyone,
I'm working a fairly large database of parts in excel. Typically most of the data in the spreadsheet is metric dimensions (mm). However, occasionally I'll come across a imperial drawing which needs to be added. I'm looking for something that can convert between mm and inches quickly (manual conversion is too slow).
Basically something that when I enter a value followed by the ' " ' (inch symbol) excel will replace my entry with the mm equiv. Or something that is similar.
Something else that could work is simply button that will convert the entire spreadsheet to either imperial or metric (as long as entries can still be added to either system).
Thanks,
edgewise
I'm working a fairly large database of parts in excel. Typically most of the data in the spreadsheet is metric dimensions (mm). However, occasionally I'll come across a imperial drawing which needs to be added. I'm looking for something that can convert between mm and inches quickly (manual conversion is too slow).
Basically something that when I enter a value followed by the ' " ' (inch symbol) excel will replace my entry with the mm equiv. Or something that is similar.
Something else that could work is simply button that will convert the entire spreadsheet to either imperial or metric (as long as entries can still be added to either system).
Thanks,
edgewise
RE: inches to mm
RE: inches to mm
you meant multiply by 25.4 correct?
RE: inches to mm
Or record a macro to do the pasting with a keystroke. One caution with the macro approach is that you can't undo it; if you do the manual paste operation and screw up by multiplying the wrong things, you can recover easily.
RE: inches to mm
RE: inches to mm
All of my data is within 4 columns.
I'm thinking it will be my best option to do something with vba code. However, my experience with vba is very limited. I do however have experience with other programming languages, is someone able to give me some direction on this, or perhaps point me to some information I might find on the net?
Thanks
RE: inches to mm
=if(right(d1,1)=char(34),d1*25.4,d1)
Otherwise, you can try:
Private Sub Worksheet_Change(ByVal Target As Range)
If Right(ActiveCell, 1) = Chr(34) Then ActiveCell.Formula = Left(ActiveCell, Len(ActiveCell) - 1) * 25.4
End Sub
TTFN
RE: inches to mm
Private Sub Worksheet_Change(ByVal Target As Range)
If Right(Target.Value, 1) = Chr(34) Then Target.Formula = Left(Target.Value, Len(Target.Value) - 1) * 25.4
End Sub
Cheers,
Joerd
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
RE: inches to mm
I haven't had a chance to give this a try at work yet, but I gave it a quick try at home and it seems to do exactly what I need.
Thanks again.