max value

  • Thread starter Thread starter PeCoNe
  • Start date Start date
P

PeCoNe

Hallo,

What is the simplest method to keep track of the highest value of a cell?

Regards
Peter
 
Hi Peter,

Am Thu, 16 Jan 2014 11:34:59 +0100 schrieb PeCoNe:
What is the simplest method to keep track of the highest value of a cell?

write the cell value into another cell. With Worksheet_Change or
Worksheet_Calculate event you can compare the two cells
If value cell > max cell then
max cell = value cell
end if


Regards
Claus B.
 
Claus Busch schreef op 2014-01-16 12:26:
Hi Peter,

Am Thu, 16 Jan 2014 11:34:59 +0100 schrieb PeCoNe:


write the cell value into another cell. With Worksheet_Change or
Worksheet_Calculate event you can compare the two cells
If value cell > max cell then
max cell = value cell
end if


Regards
Claus B.
Hi Claus,

Thanks for the answers
This is the final version:

Private Sub Worksheet_Calculate()
If Range("AA6") * Range("J6") > Range("Z6") Then
Range("Z6") = Range("AA6") * Range("J6")
End If
If Range("J6") < Range("Z6") Then
Beep
Range("F6").Interior.ColorIndex = 3
Beep
Else
Range("F6").Interior.ColorIndex = 0
End If
End Sub

Regards
Peter Maljers
 
Back
Top