Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 275
Default Auto Update Time When Cell Changes

I have an Excel spreadsheet that multiple people will use.

I would like my date column (H) to automatically update when the users
update any of their numbers (columns D, E, and F) so I can track when their
last update occured.

I'm sure this would be some form of Worksheet_Change event, but I can't find
a site that adequately describes events for my skill level.

Thank you,
Anthony
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Auto Update Time When Cell Changes

Try

http://www.mcgimpsey.com/excel/timestamp.html

In article ,
Anthony wrote:

I have an Excel spreadsheet that multiple people will use.

I would like my date column (H) to automatically update when the users
update any of their numbers (columns D, E, and F) so I can track when their
last update occured.

I'm sure this would be some form of Worksheet_Change event, but I can't find
a site that adequately describes events for my skill level.

Thank you,
Anthony

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 275
Default Auto Update Time When Cell Changes

Okay, the following code from that site should produce the results I want,
but now I need to know how to activate it... nothing I've tried has produced
anything but #NAME?.

Using a worksheet event macro.
Let's say that every time an entry is made in cells A2:A10, the
corresponding cell in column B should have the date and time entered. You
could use this Worksheet_Change() macro - put it in the worksheet code module:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range("A2:A10"), .Cells) Is Nothing Then
Application.EnableEvents = False
If IsEmpty(.Value) Then
.Offset(0, 1).ClearContents
Else
With .Offset(0, 1)
.NumberFormat = "dd mmm yyyy hh:mm:ss"
.Value = Now
End With
End If
Application.EnableEvents = True
End If
End With
End Sub


"JE McGimpsey" wrote:

Try

http://www.mcgimpsey.com/excel/timestamp.html

In article ,
Anthony wrote:

I have an Excel spreadsheet that multiple people will use.

I would like my date column (H) to automatically update when the users
update any of their numbers (columns D, E, and F) so I can track when their
last update occured.

I'm sure this would be some form of Worksheet_Change event, but I can't find
a site that adequately describes events for my skill level.

Thank you,
Anthony


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Auto Update Time When Cell Changes

I just tested this code in xl2002 and it worked just fine. However, it needs
to be put in the worksheet module where you want to run it. Right click
sheet tabview codeput it thereremove from where you put it. SAVE

--
Don Guillett
SalesAid Software

"Anthony" wrote in message
...
Okay, the following code from that site should produce the results I want,
but now I need to know how to activate it... nothing I've tried has
produced
anything but #NAME?.

Using a worksheet event macro.
Let's say that every time an entry is made in cells A2:A10, the
corresponding cell in column B should have the date and time entered. You
could use this Worksheet_Change() macro - put it in the worksheet code
module:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range("A2:A10"), .Cells) Is Nothing Then
Application.EnableEvents = False
If IsEmpty(.Value) Then
.Offset(0, 1).ClearContents
Else
With .Offset(0, 1)
.NumberFormat = "dd mmm yyyy hh:mm:ss"
.Value = Now
End With
End If
Application.EnableEvents = True
End If
End With
End Sub


"JE McGimpsey" wrote:

Try

http://www.mcgimpsey.com/excel/timestamp.html

In article ,
Anthony wrote:

I have an Excel spreadsheet that multiple people will use.

I would like my date column (H) to automatically update when the users
update any of their numbers (columns D, E, and F) so I can track when
their
last update occured.

I'm sure this would be some form of Worksheet_Change event, but I can't
find
a site that adequately describes events for my skill level.

Thank you,
Anthony






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Auto Update Time When Cell Changes

I'm new to this; hopefully you may be able to help. The scenario that Anthony
describes within the previous post is similar to my needs, with a few
differences. The most significant difference is that some of the values
within my workbook are updated using formulas rather than user input. I've
been able to alter the code from the website so that it works with values
that are user-entered. Unfortunately though, I've been unsuccessful when
referring to cells containing formulas. I've added some sample code below.
In this example, values in Range B2:B10 are populated from values within
another worksheet contained within the same workbook. Any help is much
appreciated.
Thanks, Mike


Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range("A2:A10"), .Cells) Is Nothing Then
Application.EnableEvents = False
If IsEmpty(.Value) Then
.Offset(0, 5).ClearContents
Else
With .Offset(0, 5)
.Value = "x"
End With
End If
Application.EnableEvents = True
End If
End With
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range("B2:B10"), .Cells) Is Nothing Then
Application.EnableEvents = False
If IsEmpty(.Value) Then
.Offset(0, 4).ClearContents
Else
With .Offset(0, 4)
.Value = "x"
End With
End If
Application.EnableEvents = True
End If
End With
End Sub



"JE McGimpsey" wrote:

Try

http://www.mcgimpsey.com/excel/timestamp.html

In article ,
Anthony wrote:

I have an Excel spreadsheet that multiple people will use.

I would like my date column (H) to automatically update when the users
update any of their numbers (columns D, E, and F) so I can track when their
last update occured.

I'm sure this would be some form of Worksheet_Change event, but I can't find
a site that adequately describes events for my skill level.

Thank you,
Anthony


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
Auto Update time date combo field in Microsoft Querey jd77xx Excel Discussion (Misc queries) 1 February 13th 09 07:09 PM
problem with auto update of date and time saran Excel Worksheet Functions 1 June 28th 08 02:27 AM
auto update of date and time whenever changes are made to a xcel s saran Excel Worksheet Functions 2 June 24th 08 01:39 AM
auto update of date and time whenever changes are made to a xcel s saran Excel Worksheet Functions 9 June 23rd 08 02:44 PM
Auto Update after certain time period (60 sec) mrdelia New Users to Excel 5 July 10th 05 05:06 PM


All times are GMT +1. The time now is 10:20 PM.

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

About Us

"It's about Microsoft Excel"