Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default capturing date for a change in a row of data

I want to capture (automatically) the date any change is made in a row of
data. Capture would be in a cell on the same row. I am not VBA proficient,
can anyone help?

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default capturing date for a change in a row of data

On Jul 25, 11:52*pm, Mark wrote:
I want to capture (automatically) the date any change is made in a row of
data. *Capture would be in a cell on the same row. *I am not VBA proficient,
can anyone help?

Thanks


You would need to enter a worksheet change event, so go to
toolsmacrovisual basic editor. On the left hand side you should see
the workbook (If you don't go to ViewProject explorer, from there
expand your current workbook, you should see the different worksheets
that apply to your workbook. Double click the worksheet you want this
to apply to, at the top of the code you have some dropdowns, select
worksheet in the first one and then select Change from the second one.
What you are saying is I want my code to run everytime there is a
change to the worksheet. The following should appear: Private Sub
Worksheet_Change(ByVal Target As Range) Target refers to the cell that
has changed. What you need to decide is which colum the date should
appear...

For example between the Private Sub... and End Sub... you would put:

Cells(Target.row, 5) = Date .... This would mean that in column E of
the row that has changed (E being the fifth column) the date would be
entered.

Something like...

Private Sub Worksheet_Change(ByVal Target As Range)
Cells(Target.Row, 5) = Date
End Sub

Cells is a standard notation for referencing the cell, otherwise you
would use the Range notation, in which case...

Private Sub Worksheet_Change(ByVal Target As Range)
Range("E" & Target.row) = date
End Sub

Again changing "E" to the colum you want to enter the date into, this
would do exactly the same thing, Date is a built in function in VBA.

James
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default capturing date for a change in a row of data

Thanks, that worked really well. However....I probably over simplified it.
I want a date only if there is a change, now even a click in a cell does the
data addition. Is there anything I can do to check for an actual change or
addition?

thanks again,

Mark

" wrote:

On Jul 25, 11:52 pm, Mark wrote:
I want to capture (automatically) the date any change is made in a row of
data. Capture would be in a cell on the same row. I am not VBA proficient,
can anyone help?

Thanks


You would need to enter a worksheet change event, so go to
toolsmacrovisual basic editor. On the left hand side you should see
the workbook (If you don't go to ViewProject explorer, from there
expand your current workbook, you should see the different worksheets
that apply to your workbook. Double click the worksheet you want this
to apply to, at the top of the code you have some dropdowns, select
worksheet in the first one and then select Change from the second one.
What you are saying is I want my code to run everytime there is a
change to the worksheet. The following should appear: Private Sub
Worksheet_Change(ByVal Target As Range) Target refers to the cell that
has changed. What you need to decide is which colum the date should
appear...

For example between the Private Sub... and End Sub... you would put:

Cells(Target.row, 5) = Date .... This would mean that in column E of
the row that has changed (E being the fifth column) the date would be
entered.

Something like...

Private Sub Worksheet_Change(ByVal Target As Range)
Cells(Target.Row, 5) = Date
End Sub

Cells is a standard notation for referencing the cell, otherwise you
would use the Range notation, in which case...

Private Sub Worksheet_Change(ByVal Target As Range)
Range("E" & Target.row) = date
End Sub

Again changing "E" to the colum you want to enter the date into, this
would do exactly the same thing, Date is a built in function in VBA.

James

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Capturing The Date Of When Data Is Inputted justduet Excel Discussion (Misc queries) 1 October 20th 07 07:46 PM
capturing date of entering data in a spreadsheet [email protected] Excel Programming 1 November 10th 06 09:19 AM
Capturing Date Larry Fish via OfficeKB.com New Users to Excel 4 September 27th 06 01:40 PM
Capturing First Change In A Cell carl Excel Worksheet Functions 4 February 21st 06 01:21 PM
Capturing The First Change in a Formula carl Excel Worksheet Functions 9 February 17th 06 10:37 PM


All times are GMT +1. The time now is 07:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"