A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
i tried with both the solutions but none is working . Let me refphrase the question.
i have code as follows and it is working
cost = Application.WorksheetFunction.Min(DR.Caption, HRC.Caption, HRA.Caption, PAD.Caption)
and now i want to change "min" in the formula to "small"
how to do this.
please help.
Hi,
What are DR.Caption etc? try this
Dim MyArr As Variant, cost As Double
MyArr = Array(CDbl(Dr.Caption), CDbl(HRC.Caption), CDbl(HRA.Caption), CDbl(PAD.Caption))
cost = Application.Small(MyArr, 2)