ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Need help with automatic date entry (https://www.excelbanter.com/excel-discussion-misc-queries/26878-need-help-automatic-date-entry.html)

Mike200575

Need help with automatic date entry
 
In a sheet used as a data base, how do I have the current date updated or
changed when the data changes in a record or row. I would like this to show
when that record has been modified with out manually changing that cell.

Harald Staff

Hi

Rightclick the sheet tab, choose "view code", paste this macro in:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target(1).Column < 5 Then _
Cells(Target(1).Row, 5).Value = Now

End Sub

Replace 5 with whichever column number your dates are stored in.

HTH. Best wishes Harald

"Mike200575" skrev i melding
...
In a sheet used as a data base, how do I have the current date updated or
changed when the data changes in a record or row. I would like this to

show
when that record has been modified with out manually changing that cell.




Don Guillett

You can do this with a worksheet_change event macro which is told to use
date in the cell if cells in the row have changed.

--
Don Guillett
SalesAid Software

"Mike200575" wrote in message
...
In a sheet used as a data base, how do I have the current date updated or
changed when the data changes in a record or row. I would like this to

show
when that record has been modified with out manually changing that cell.





All times are GMT +1. The time now is 05:34 PM.

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