Good Evening all.
I have a formula I use and would like to make it a User Defined Function (UDF)
I have replace the dell references with actual numbers for clarity.
The worksheet formula is:
=1/(SIN(RADIANS(DEGREES(ATAN(3/1)))))*12.5*20
The code I tried to write is:
Function SLOPES(VerticleSlopeLeg, HorzSlopeLeg, HorzDist, Width) 'To Find Area of Slope
SLOPES = 1 / (Application.WorksheetFunction.Sin * (Application.WorksheetFunction.Radians(Atn(VerticleSlopeLeg / HorzSlopeLeg)))) * HorzDist * Width
End Function
Will you why it will not work?
I have a formula I use and would like to make it a User Defined Function (UDF)
I have replace the dell references with actual numbers for clarity.
The worksheet formula is:
=1/(SIN(RADIANS(DEGREES(ATAN(3/1)))))*12.5*20
The code I tried to write is:
Function SLOPES(VerticleSlopeLeg, HorzSlopeLeg, HorzDist, Width) 'To Find Area of Slope
SLOPES = 1 / (Application.WorksheetFunction.Sin * (Application.WorksheetFunction.Radians(Atn(VerticleSlopeLeg / HorzSlopeLeg)))) * HorzDist * Width
End Function
Will you why it will not work?