How to create a custom function in Excel?

I want to create a function for the radius of a cylinder with the variable being height and 355 as the volume. The formula would be √(355/(h*π)) which is the square root of the quantity of 355 divided by (h times pi). Thanks so much. I know how to create a custom function, but I don't know what to type as the function. Thanks

siti Vi2011-04-17T22:00:49Z

Favorite Answer

From excel worksheet. press Alt + F11 (visual basic editor)
Menu > Insert > Module
in the Standard Module put this Function Procedure

'---------------------------
Public Function CylRad(H)
CylRad = Sqr(355 / (H * 3.14159265358979))
End Function
'------------

Syntax in Sheet /cell
=CylRad(H)
where H is a number OR a cell reference / cell containing a number

jimmymae20002011-04-17T19:57:18Z

You need to specify a column containing finite values like 1 to 100 (for h) and then solve for r based on the specific values of h. Otherwise you are looking for an infinite number of solutions.