Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 334
Default Save value of cell prior to change

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 320
Default Save value of cell prior to change

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

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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 320
Default Save value of cell prior to change

Make that Right-click, not Tight-click
:-)


"Bob Umlas" wrote in message
...
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

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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I run a macro upon saving a file but prior to actual save? Hawk186 Excel Discussion (Misc queries) 2 June 6th 08 09:38 PM
accidental save - recover prior version of Excel file? Gailbee Excel Discussion (Misc queries) 2 November 14th 07 03:24 PM
I need to change cell string lenths prior to upload into sql table kevt Excel Worksheet Functions 1 September 6th 06 06:44 PM
Checking Client Status Prior to Save jan8121 New Users to Excel 0 July 30th 06 11:06 AM
How do I recover excel document prior to auto-save? Qwertatious Excel Discussion (Misc queries) 0 January 7th 06 06:45 PM


All times are GMT +1. The time now is 06:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"