Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Time or row cell updated


I have an XLS which is updated throughout the day with new rows of data.
I want to capture the time each row is input. Ideally when a specific
cell is input I want to put the associated time at the end of the row
soI can calculate the time between each row. I have tried the obvious
=NOW() function but ever time the sheet recalculates the times change.


Is there a way to capture the current time but not update it when the
sheet re-calculates?




--
525047
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Time or row cell updated

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'when entering data in a cell in Col A
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 1 Then
n = Target.Row
If Excel.Range("A" & n).Value < "" Then
Excel.Range("B" & n).Value = Format(Now, "h:mm:ss AM/PM")
End If
End If
enditall:
Application.EnableEvents = True
End S

As you enter data in column A, the date/time will be entered in column B

This is worksheet event code. Right-click on the sheet tab and "View Code".

Copy/paste into that sheet module. Adjust to suit. Alt + q to return to the
Excel window.


Gord Dibben MS Excel MVP

On Sat, 22 Mar 2008 22:59:42 +0000, 525047
wrote:


I have an XLS which is updated throughout the day with new rows of data.
I want to capture the time each row is input. Ideally when a specific
cell is input I want to put the associated time at the end of the row
soI can calculate the time between each row. I have tried the obvious
=NOW() function but ever time the sheet recalculates the times change.


Is there a way to capture the current time but not update it when the
sheet re-calculates?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 709
Default Time or row cell updated

Try this if you don't want to use a macro. Change accordingly:
=IF(B3="","",IF(C3="",NOW(),C3))
Tool/Options/Calculations/Check Aterations

"525047" wrote:


I have an XLS which is updated throughout the day with new rows of data.
I want to capture the time each row is input. Ideally when a specific
cell is input I want to put the associated time at the end of the row
soI can calculate the time between each row. I have tried the obvious
=NOW() function but ever time the sheet recalculates the times change.


Is there a way to capture the current time but not update it when the
sheet re-calculates?




--
525047

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
updated cell with current time\date if any data in a row has chan pmj Excel Worksheet Functions 4 August 27th 07 08:28 PM
date and time updated automatically Richard Excel Worksheet Functions 1 February 5th 06 04:48 AM
Current date and time updated automatically Richard Excel Discussion (Misc queries) 7 February 4th 06 09:00 PM
Cell Value Updated based cell input DC Excel Discussion (Misc queries) 2 August 17th 05 11:07 PM
How to have:= NOW () date/time change only if updated and saved Bob Provis Excel Worksheet Functions 2 August 7th 05 10:47 AM


All times are GMT +1. The time now is 02:27 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"