Maximum of selection

  • Thread starter Thread starter Robin Clay
  • Start date Start date
R

Robin Clay

Greetings !

Having selected a block say 4 columns wide and 12 rows
long, I want to establish the maximum value of the
selected cells in a particular column.

I have tried
myMax = MAX( _
Selection.FirstCol & _
Selection.FirstRow & ":" & _
Selection.FirstCol & _
Selection.LastRow)
but it doesn't work.

I would be most grateful if SKS would please furnish me
with the right expression.

And also, how would that expression change to find the
maximum of say the third column ?
 
Robin,

myMax = Application.WorksheetFunction.Max(Selection.Columns(1))

For the third column of the selection:

myMax = Application.WorksheetFunction.Max(Selection.Columns(3))

HTH,
Bernie
 
Back
Top