ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Time stamp - data input to row (https://www.excelbanter.com/excel-programming/369020-time-stamp-data-input-row.html)

george-v

Time stamp - data input to row
 
Hi,

I have an Excel spreadsheet with almost 2000 rows of data presently.
For future data input, need to capture two additional info in two more
columns.

one which capture the date on which data is input into a blank row anywhere

and second column the date on which any data is modified in any row but on
specified columns-say column B, C, D , E and F

lastly for the existing 2000 rows, the date created and date modified column
can take arbitrary date of 07/01/2006.

Help please.

George V



Robert

Time stamp - data input to row
 
Hi George, not exactly what you wanted, but this could get you going towards
your need. This example is for A1:100 and D1 to D100. Also do a search on
this site.

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A1:A100")) Is Nothing Then
With Target
.Offset(0, 6).Value = Format(Now, "dd mmm yy hh:mm:ss")
.Offset(0, 7).Value = Environ("UserName")
End With
End If
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("D1:D100")) Is Nothing Then
With Target
.Offset(0, 3).Value = Format(Now, "dd mmm yy hh:mm:ss")
.Offset(0, 4).Value = Environ("UserName")
End With
End If



ws_exit:
Application.EnableEvents = True
End Sub

--
Robert


"george-v" wrote:

Hi,

I have an Excel spreadsheet with almost 2000 rows of data presently.
For future data input, need to capture two additional info in two more
columns.

one which capture the date on which data is input into a blank row anywhere

and second column the date on which any data is modified in any row but on
specified columns-say column B, C, D , E and F

lastly for the existing 2000 rows, the date created and date modified column
can take arbitrary date of 07/01/2006.

Help please.

George V




All times are GMT +1. The time now is 02:26 AM.

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