ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to get a date stamp whenever a value is changed? (https://www.excelbanter.com/excel-programming/391606-how-get-date-stamp-whenever-value-changed.html)

Tueanker

How to get a date stamp whenever a value is changed?
 
Hi everybody

The problem is as follows:
I need to get a date stamp in a columns b-g everytime my workbook is saved
with a new value in column A. In column A I have made a picklist with seven
different values, and I want to get a date stamp everytime the status of
culumn A is changed. Is there any way I can do this?

Any help would be greatly appreciated!

Kind regards,
Tue

Barb Reinhardt

How to get a date stamp whenever a value is changed?
 
Right click on the worksheet tab that you want to check and select VIEW CODE.
Paste this in

Private Sub Worksheet_Change(ByVal Target As Range)
Dim myWS As Worksheet
Set myWS = Target.Parent

If Target.Count 1 Then Exit Sub
If Not Intersect(Target, Range("A:A")) Is Nothing Then
myWS.Cells(Target.Row, 2).Value = Date + Time 'Change 2 to the column
you need A=1, B=2, C=3 etc.
End If

End Sub

HTH,
Barb Reinhardt



"Tueanker" wrote:

Hi everybody

The problem is as follows:
I need to get a date stamp in a columns b-g everytime my workbook is saved
with a new value in column A. In column A I have made a picklist with seven
different values, and I want to get a date stamp everytime the status of
culumn A is changed. Is there any way I can do this?

Any help would be greatly appreciated!

Kind regards,
Tue



All times are GMT +1. The time now is 04:18 AM.

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