ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I have a cell display the date its row was last updated? (https://www.excelbanter.com/excel-discussion-misc-queries/110607-how-do-i-have-cell-display-date-its-row-last-updated.html)

castell

How do I have a cell display the date its row was last updated?
 
Hiya,
does anyone know how to have a cell automatically display adate that is
refreshed to today whenever its row is updated? - would be massively useful...

many thanks!


Niek Otten

How do I have a cell display the date its row was last updated?
 
http://www.mcgimpsey.com/excel/timestamp.html


--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"castell" wrote in message ...
| Hiya,
| does anyone know how to have a cell automatically display adate that is
| refreshed to today whenever its row is updated? - would be massively useful...
|
| many thanks!
|



JLatham

How do I have a cell display the date its row was last updated?
 
How to insert code into worksheets:
http://www.jlathamsite.com/Teach/WorksheetCode.htm

Just change "A" to whatever column the date should be placed into on the
current sheet/row where a change was made.

If you need this on several sheets, each worksheet needs this code added to
it's _Change() event.

Private Sub Worksheet_Change(ByVal Target As Range)
Const DateCellColumn = "A" ' change
If Target.Cells.Count 1 Then
Exit Sub
End If

Application.EnableEvents = False
Range(DateCellColumn & Target.Row) = Now()
Application.EnableEvents = True

End SubHow to insert code into worksheets:
http://www.jlathamsite.com/Teach/WorksheetCode.htm

Just change "A" to whatever column the date should be placed into on the
current sheet/row where a change was made.

If you need this on several sheets, each worksheet needs this code added to
it's _Change() event.

Private Sub Worksheet_Change(ByVal Target As Range)
Const DateCellColumn = "A" ' change
If Target.Cells.Count 1 Then
Exit Sub
End If

Application.EnableEvents = False
Range(DateCellColumn & Target.Row) = Now()
Application.EnableEvents = True

End Sub

"castell" wrote:

Hiya,
does anyone know how to have a cell automatically display adate that is
refreshed to today whenever its row is updated? - would be massively useful...

many thanks!



All times are GMT +1. The time now is 09:37 PM.

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