ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Changing a cell if its value is not as great as another (https://www.excelbanter.com/excel-discussion-misc-queries/106007-changing-cell-if-its-value-not-great-another.html)

Gupta A.

Changing a cell if its value is not as great as another
 
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.

Don Guillett

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.





All times are GMT +1. The time now is 12:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com