Capturing The Date Of When Data Is Inputted
When data is inputted into a cell I would like to capture the date of when
that occurred. How could I do that and then utilze that date in a formula later on? Any help would be appreciated... |
Capturing The Date Of When Data Is Inputted
This event code will place the date in the adjacent cell in column B when you
enter data in column A in the range A1:A20 Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ws_exit: If Intersect(Range(Target(1).Address), _ Range("A1:A20")) Is Nothing Then Exit Sub Application.EnableEvents = False Target.Offset(0, 1).Value = Now() ws_exit: Application.EnableEvents = True End Sub This is sheet event code. Right-click on the sheet tab and "View Code". Copy/paste the code into that sheet module. Range can be one cell like "A1" or an entire column like "A:A" or a fixed range "A1:A20" as I have written above. Gord Dibben MS Excel MVP On Sat, 20 Oct 2007 11:11:00 -0700, justduet wrote: When data is inputted into a cell I would like to capture the date of when that occurred. How could I do that and then utilze that date in a formula later on? Any help would be appreciated... |
All times are GMT +1. The time now is 12:56 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com