#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Time Stamping A Cell

Hello,

WOuld anyone be able to help me out with an EXCEL question? I was wondering
if it is at all possible to establish a relationship between cells? Lets say
if cell C4 was filled in at 830am, I want cell D4 to reflect the time it was
filled in.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default Time Stamping A Cell

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


--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Time" wrote in message ...
| Hello,
|
| WOuld anyone be able to help me out with an EXCEL question? I was wondering
| if it is at all possible to establish a relationship between cells? Lets say
| if cell C4 was filled in at 830am, I want cell D4 to reflect the time it was
| filled in.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Time Stamping A Cell

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'when entering data in any cell in Col C
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 3 Then

'change line above to line below if want a range in C
'If Not Application.Intersect(Range("C1:C20"), Target) Is Nothing Then

n = Target.Row
If Excel.Range("C" & n).Value < "" Then
Excel.Range("D" & n).Value = Now
End If
End If
enditall:
Application.EnableEvents = True
End Sub

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

Copy/paste the code into that sheet module.


Gord Dibben MS Excel MVP

On Wed, 7 Mar 2007 09:08:51 -0800, Time wrote:

Hello,

WOuld anyone be able to help me out with an EXCEL question? I was wondering
if it is at all possible to establish a relationship between cells? Lets say
if cell C4 was filled in at 830am, I want cell D4 to reflect the time it was
filled in.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Time Stamping A Cell

Does that code also work for shared workbooks? I am trying to establish a
workbook where people enter there initials into a cell (ex. Cell A1 at
8:35am), and I would like to have it also reflected on my computer as 8:35am
when I hit save to update the changes. Thanks again!!

"Gord Dibben" wrote:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'when entering data in any cell in Col C
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 3 Then

'change line above to line below if want a range in C
'If Not Application.Intersect(Range("C1:C20"), Target) Is Nothing Then

n = Target.Row
If Excel.Range("C" & n).Value < "" Then
Excel.Range("D" & n).Value = Now
End If
End If
enditall:
Application.EnableEvents = True
End Sub

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

Copy/paste the code into that sheet module.


Gord Dibben MS Excel MVP

On Wed, 7 Mar 2007 09:08:51 -0800, Time wrote:

Hello,

WOuld anyone be able to help me out with an EXCEL question? I was wondering
if it is at all possible to establish a relationship between cells? Lets say
if cell C4 was filled in at 830am, I want cell D4 to reflect the time it was
filled in.



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
Running averages and time stamping Scott W Excel Worksheet Functions 0 May 13th 06 01:47 PM
Date and time stamping multiple cells for multiple entries. Gerald Excel Worksheet Functions 1 May 9th 06 01:45 PM
Extracting Time from a cell that has both the date and the time Hani Muhtadi Excel Discussion (Misc queries) 3 September 9th 05 10:59 AM
Adding time to date-time formatted cell tawtrey(remove this )@pacificfoods.com Excel Discussion (Misc queries) 4 August 12th 05 10:53 PM
how do i type a time into a cell formatted for time? Armadillo Excel Discussion (Misc queries) 4 June 16th 05 11:32 PM


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