Save value of cell prior to change

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

is there any way to save the value of a cell into another cell if the cell is
updated?

If A1 has a date (01/01/09) and that date changes (02/01/09)I want to save
the previous value (01/01/09) in K1.

This repeats on 4 cells within the row and multiple rows.

thanks,
Rick
 
Tight-click the sheet tab, select view Code, paste this in:

Dim WasValue

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then Cells(Target.Row, 11).Value = WasValue
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 Then WasValue = Target.Value
End Sub


Bob Umlas
Excel MVP
 
Make that Right-click, not Tight-click
:-)


Bob Umlas said:
Tight-click the sheet tab, select view Code, paste this in:

Dim WasValue

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then Cells(Target.Row, 11).Value = WasValue
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 Then WasValue = Target.Value
End Sub


Bob Umlas
Excel MVP
 
Back
Top