Units

  • Thread starter Thread starter kwrohde
  • Start date Start date
K

kwrohde

does excel recognize units? If so which ones? Is there a good way t
define them yourself? thank
 
Hey Guys,

Don't tell me Canada and Germany don't have units of length, volume,
temperature or currency.<g>
--


Regards,

RD
 
Hi kwrohde!

Excel recognises numbers. It is for you to define what those numbers
are. There's no automatic assumption of metric or Imperial and even
the currency symbol is based upon your computer's regional settings.

You can use the CONVERT function to convert between various unit
types. See the very extensive Help file on CONVERT as there is a lot
of useful stuff in it.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Is there a good way to define them yourself?

Like others have mentioned, Excel can not work well with Units like a
dedicated Math program like Mathematica. Excel can not keep track of
numeric, and a separate symbolic units.

One poor-mans way to do something like this would be to use Range Named
constants. It depends on what you are doing of course. If you wanted to
work in hours, here is a small example. It is not the best idea, but it may
give you some ideas for your situation.


Sub Demo()
ActiveWorkbook.Names.Add Name:="miles", RefersTo:="=1"
ActiveWorkbook.Names.Add Name:="hour", RefersTo:="=1"

'1 Hour = 60 Minutes
ActiveWorkbook.Names.Add Name:="minutes", RefersTo:="=hour / 60"


[A1].Formula = "=60*miles / hour"

[B1].Formula = "=2*hour"
' Or...
[B1].Formula = "=120*minutes"

[C1].Formula = "=A1*B1"
End Sub
 
Back
Top