Changing a cell if its value is not as great as another

G

Gupta A.

Say i have two cells, A1 is dynamic. In A2 i want the maximum value whic
hever appears in A1. For example if A1 becomes 10, and then drops to 5, i
want A2 to display 10 until the value becomes greater than ten.
 
D

Don Guillett

One way. right click sheet tab>view code>insert this.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$A$1" Then Exit Sub
If Range("a1") > Range("a2") Then Range("a2") = Range("a1")
End Sub
 
Top