ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Automatically insert last updated date (https://www.excelbanter.com/excel-discussion-misc-queries/125526-automatically-insert-last-updated-date.html)

Marie Bayes

Automatically insert last updated date
 
Is it possible for a last updated date to be inserted into a cell in a
spreadsheet that is only updatted if the spreadsheet is changed?

Bob Phillips

Automatically insert last updated date
 
'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Worksheets("Sheet1").Range("A1") = Format(Date, "dd mmm yyyy")
End Sub


--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Marie Bayes" wrote in message
...
Is it possible for a last updated date to be inserted into a cell in a
spreadsheet that is only updatted if the spreadsheet is changed?




Marie Bayes

Automatically insert last updated date
 
Brilliant, thanks.

"Bob Phillips" wrote:

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Worksheets("Sheet1").Range("A1") = Format(Date, "dd mmm yyyy")
End Sub


--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Marie Bayes" wrote in message
...
Is it possible for a last updated date to be inserted into a cell in a
spreadsheet that is only updatted if the spreadsheet is changed?





Nancy Carey

Automatically insert last updated date - BobPhillips
 
I have followed the instructions for inserting the last update date, but nothing appears on my spreadsheet. What am I doing wrong?

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com


All times are GMT +1. The time now is 05:11 AM.

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