Custom functions-Reg

R

raja_turbine

Hi,

I want to create a Custom function, and want it to appear on the lis
when I use " Insert function".

I use a lot of conversion from Foot, Inches etc to mm. km etc in m
calculation.

I have to keep looking for the conversion factors. So I want to creat
functions, for example to convert inches to millimeters and call i
"frinchtomm" and this function should appear when I use "Inser
fucntion". How do I do this?


Thanks and regards,
Raj
 
J

Jim Cone

Raja,

Take a look at the "Convert" function....

=CONVERT(4,"in","mm") returns "101.6".

You must have the "Analysis Tool Pack" checked in Tools | Add-ins.

Regards,
Jim Cone
San Francisco, CA
 
G

Gord Dibben

Raja

Function frinchtomm(NumberArg As Double) As Double
If NumberArg < 0 Then
Exit Function
Else
frinchtomm = NumberArg * 25.4
End If
End Function

Copy/paste to a general module in your workbook.

It will show up in the Insert Function list under "User Defined" category.

usage is: =frinchtomm(number or cell reference)

Gord Dibben Excel MVP
 
Top