Find variable with the highest value
You can do call out to the worksheet's MAX function...
MaxVal = WorksheetFunction.Max(Int1, Int2, Int3, Int4, Int5)
--
Rick (MVP - Excel)
"MJKelly" wrote in message
...
Hi, I have 5 variables containing integers. How can I use vba to
identify the variable with the highest value?
Thanks
Matt
|