max value

P

PeCoNe

Hallo,

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

Regards
Peter
 
C

Claus Busch

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.
 
P

PeCoNe

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top