Copy and Paste value to another cell after Update

katkth7533

New Member
Joined
Aug 18, 2014
Messages
14
I hope this makes sense. I have a spread sheet where I am tracking 3 dates: "Date Created" (which is added once and does not change), "Last Update" (which is a vba code that will insert the current system date in the cell if any changes are made to any cell in a range) and "Previous Update" which is what I need help to figure out. For this cell, I would like the last value (date) from the "Last Update" cell to be inserted when that cell is update. For example:

Date Created: July 1, 2015
Last Update: August 15, 2015
Previous Update: August 9, 2015

'Last Update" is a formula that will update the date if the values in a range are changed. Let's say someone makes a change to the cells in that range today. The "Last Update" field will automatically update to "August 24, 2015". I want the "Previous Update" cell to have the last value in the "Last Update" cell inserted. In this example, "Previous Update" would change to "August 15, 2015" have the "Last Update" field changes to today's date. Does that make sense?
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
If I understand it well, your VBA should copy the cell of the last update, paste the value in previous update cell before putting today's date in Last update. if so, you should post the code so that we can change it.


(right click the sheet, view code and copy-paste everything)
 
Upvote 0
Here is the code. The "Previous Update" cell is K3. Thanks

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Target.Worksheet.Range("E6:E13")) Is Nothing Then
        Sheets("TEST1").Range("K2") = Date
    End If
    
End Sub
 
Upvote 0
Let's try this
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Target.Worksheet.Range("E6:E13")) Is Nothing Then
        [FONT=Verdana]Sheets("TEST1").Range("K3")=[/FONT][FONT=Verdana]Sheets("TEST1").Range("K2").value[/FONT][FONT=Verdana]
[/FONT]Sheets("TEST1").Range("K2") = Date
    End If
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,989
Members
452,541
Latest member
haasro02

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top