Sorry for the confusing title, essentially what I am trying to accomplish is creating the VBA for the excel ceiling_math function so I can use it in a linear interpolation function I am creating. I would like to figure out the code to allow the unitcount and significance in this code (bolded) to be entered and/or selected by the user. I have the unitcount equal to the active cell value but I know that will not work how I want it to.
Thank you!
---------------------------------------------------------------------------------------------------------
Function CeilingTry1()
Dim unitcount As Double
Dim significance As Double
Dim ceilingmathUnitcount As Double
unitcount = ActiveCell.Value
ceilingmathUnitcount = Application.WorksheetFunction.Ceiling_Math(unitcount, significance)
MsgBox "The value is " & ceilingmathUnitcount
End Function
-----------------------------------------------------------------------------------------------------------
Thank you!
---------------------------------------------------------------------------------------------------------
Function CeilingTry1()
Dim unitcount As Double
Dim significance As Double
Dim ceilingmathUnitcount As Double
unitcount = ActiveCell.Value
ceilingmathUnitcount = Application.WorksheetFunction.Ceiling_Math(unitcount, significance)
MsgBox "The value is " & ceilingmathUnitcount
End Function
-----------------------------------------------------------------------------------------------------------