View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Monarch[_2_] Monarch[_2_] is offline
external usenet poster
 
Posts: 12
Default Please help me solve my problem

Right Click on worksheet label, click View Code and copy this code in
editor.
I assume that cell A2 is MAX number cell and cell B2 is MIN number cell
you can change their position
(Cells(2,1) = A2 and Cells(2,2) = B2 e.g. function is cells(row, column))

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
If Target.Value Cells(2, 1).Value Then
Cells(2, 1).Value = Target.Value
ElseIf Target.Value < Cells(2, 2).Value Then
Cells(2, 2).Value = Target.Value
ElseIf Len(Cells(2, 2).Value) = 0 Then
Cells(2, 2).Value = Target.Value
End If
End If
End Sub

On 05.03.2010 09:01, Sacha David wrote:
Hi, I Have a cell say a1 that has a continuously changing number it
in and I want to track the highest number that it prints, and the
same for the lowest number in cell a2. I would like these results to
show up in the cells below them

Im very new to programming and your help would be much appreciated

many thanks

Sacha David