COpy paste worksheet

tlindeman

Active Member
Joined
Jun 29, 2005
Messages
313
I am not sure this is possible. However, I need to copy a worksheet from an email and paste into my workbook each month. What I would like in Cell A1 is to show the date that I copy and pasted the worksheet. So many whenever cell A2 changes, show todays date. Also, could you please help me to set it up to run when I open my workbook ("Enterprise KPIS")

Thank You
Tony
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
I am not sure this is possible. However, I need to copy a worksheet from an email and paste into my workbook each month. What I would like in Cell A1 is to show the date that I copy and pasted the worksheet. So many whenever cell A2 changes, show todays date. Also, could you please help me to set it up to run when I open my workbook ("Enterprise KPIS")

Thank You
Tony


well the date part is easy, just (this would go in the workbook open section)

Code:
Private Sub Workbook_Open()
thisworkbook.sheets("Sheet1").range("A1").value = date
 
'you would need something that tests the value in A2 has changed so 'maybe recording it to a cell that is out of the way and referring back to 'it.
 
thisworkbook.sheets("Sheet2").range("A1").value = thisworkbook.sheets("Sheet1").range("A2").value
 
If thisworkbook.sheets("Sheet2").range("A1").value = thisworkbook.sheets("Sheet1").range("A2").value then
 
'nothing
 
else 
thisworkbook.sheets("Sheet1").range("A1").value = date
end if
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,741
Members
452,940
Latest member
rootytrip

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