In the VBA macros, you must use
Application.worksheetfunction.Min(argument)
If you do this sort of thing a lot, you can do
Dim wsf as worksheetfunction
Set wsf as Application.worksheetfunction
......
Cells(i,7) = wsf.Min(range(cells(j,2),cells((K,2)))
I confess I have not seen this syntax before. Do you know that it works?
(Cells(j, 2)(k, 2)).
Do you mean Min (Cells(j, 2),cells(k, 2)). (just 2 cells compared)
Stephen M. Rasey
WiserWays, LLC
Houston, TX
http://excelsig.org
"Shannon" wrote in message
...
Am trying to write a Macro that looks at three fields
(cells) and gives me the Minimum, Maximum, and Average
into another specified field, i.e. Cells(i, 7).Value = Min
(Cells(j, 2)(k, 2)). Get error message that Min is an
undefined Sub or Function. How do I calculate the Min?