View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Changing a cell if its value is not as great as another

One way. right click sheet tabview codeinsert 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


--
Don Guillett
SalesAid Software

"Gupta A." wrote in message
...
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.