View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Λ­ΚΗΛ­ Λ­ΚΗΛ­ is offline
external usenet poster
 
Posts: 2
Default define max in range (macro)

Yes!
"Mike H" ...
Hi,

MaxVal = WorksheetFunction.Max(Range("D2:D" & Cells(Rows.Count,
"D").End(xlUp).Row))

Mike

"Steve" wrote:

I want to define a constant in my macro to be the max value in column D
from
row 2 to the last row. I'm sure this is an easy one but can't come up
with
the code.