![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 22
|
One of my co-workers is creating a spreadsheet with a list of values in one column and the date when these values changed in another column. Is there a way to code the date column to automatically change to the current date when the value changes? Any help would very much be appreciated.
|
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Apr 2002
Location: Midlands, UK
Posts: 217
|
Hi,
Put this code in the worksheet module where you need the changes tracked & the date recorded ( let me know if you'd like more explination ). It assumes that you want to check for changes in col A ( 1 ) and then record the date in col B. Private Sub Worksheet_Change(ByVal Target As Excel.Range) If ActiveCell.Column = "1" Then ActiveCell.Offset(-1, 1).Value = Now() End If End Sub |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|