U
u473
I cannot find the proper syntax for this Max Function
Assume the current Row# is 20. I want to populate H20 with the
Max(I20,M20,O20)
I have an Error whether I reverse the order of Columns-Rows reference
or not, but I am still in learning mode.
Dim LastRow As Long, ShNextRow As Long, Fcst As Long
With ActiveSheet
For ShNextRow = 10 To LastRow
Fcst = WorksheetFunction.Max(Range("I" & ShNextRow, "M" &
ShNextRow, "O" & ShNextRow))
.Range("H" & ShNextRow) = Fcst
Next ShNextRow
End With
Your help will be appreciated,
Wayne
Assume the current Row# is 20. I want to populate H20 with the
Max(I20,M20,O20)
I have an Error whether I reverse the order of Columns-Rows reference
or not, but I am still in learning mode.
Dim LastRow As Long, ShNextRow As Long, Fcst As Long
With ActiveSheet
For ShNextRow = 10 To LastRow
Fcst = WorksheetFunction.Max(Range("I" & ShNextRow, "M" &
ShNextRow, "O" & ShNextRow))
.Range("H" & ShNextRow) = Fcst
Next ShNextRow
End With
Your help will be appreciated,
Wayne