Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default how to update time in corresponding cell only

Hi,
I need HELP in figuring out how to update the time in correspoding cell when
the value in the current cell gets changed. For example, if i have 10 rows
where in if i change value in C1 then the time in cell D1 should get updated
to the current time only.
But if i change the value in cell C2, corresponding time in D2 shuld get
changed only and not the time in cell C1
Currently i have written a macro such that
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("C5")) Is Nothing Then
Exit Sub
Else
Range("C5").Next = Now()
End If
End Sub
But this isnt giving me the flexibility for any row.
Thanks in advance,
Rusty
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default how to update time in corresponding cell only

How about

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 3 Then
Target.Offset(0, 1).Value = Now()
End If
End Sub

Hope this helps
Rowan

"Rusty" wrote:

Hi,
I need HELP in figuring out how to update the time in correspoding cell when
the value in the current cell gets changed. For example, if i have 10 rows
where in if i change value in C1 then the time in cell D1 should get updated
to the current time only.
But if i change the value in cell C2, corresponding time in D2 shuld get
changed only and not the time in cell C1
Currently i have written a macro such that
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("C5")) Is Nothing Then
Exit Sub
Else
Range("C5").Next = Now()
End If
End Sub
But this isnt giving me the flexibility for any row.
Thanks in advance,
Rusty

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
Cell Update only at a specific time. Scott520 Excel Discussion (Misc queries) 4 August 8th 13 08:41 PM
Update a cell with a time. Colin Hayes Excel Discussion (Misc queries) 3 January 27th 10 12:24 AM
Setting time of last update in a cell R Mallory Excel Discussion (Misc queries) 7 January 16th 07 09:47 PM
How do you continuously update time and date in an Excel cell? engine99 Excel Worksheet Functions 7 February 21st 05 02:20 AM
How do you continuously update time and date in an Excel cell? engine99 Excel Programming 1 February 20th 05 08:13 PM


All times are GMT +1. The time now is 06:25 AM.

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"