Conversion

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to convert selected cells from from unit-of-measure to another. I need to change cells from Gallons to liters, feet to meters, currency to euros etc. Any pointers would be greatly appreciated
Thank
Bob
 
Hi
have a look at the CONVERT function

--
Regards
Frank Kabel
Frankfurt, Germany

Bob R said:
Is it possible to convert selected cells from from unit-of-measure to
another. I need to change cells from Gallons to liters, feet to
meters, currency to euros etc. Any pointers would be greatly
appreciated.
 
I've printed the help file for the CONVERT and EUROCONVERTfunction. I knew you could convert a number, but can you convert a range of cells. I cannot convert an entrire sheet due to all the values are not the same
Thanks
Bob
 
Hi Bob!

Save your file under a new name and work with the new file until
you're happy.
Put the conversion factor for one unit to another in a cell
Example:
=CONVERT(1,"kg","lbm")
Returns: 2.20462291469134
Note that you multiply kg by this factor to get pounds.

Now select the cell with this multiplier in it.
Copy
Select the range of cells you want to convert
Edit > Paste Special
Check "Multiply"
OK

Change your heading from kg to lbm.
 
Bob

To convert imperial gallons to liters.

Sub gronk()
For Each cel In Selection
cel.Value = cel.Value * 4.54
Next cel
End Sub

For the etc. part, use the same code with your various conversion factors.

Gord Dibben Excel MVP
 
Back
Top