PC Review


Reply
Thread Tools Rate Thread

Automatic time stamp

 
 
Da Mann
Guest
Posts: n/a
 
      18th Oct 2003
I was wondering if there's a way to add an automatic time stamp. What I'd
like to do is to add a timestamp to a cell (say, B1) when an entry is made a
seperate cell (say A1). Anyone have any ideas? My research, thus far, has
been fruitless.

Thank you!


 
Reply With Quote
 
 
 
 
Gord Dibben
Guest
Posts: n/a
 
      18th Oct 2003
This code placed in a worksheet module will do as requested.

Right-click on your sheet tab and select "View Code". Copy/paste this code
into that module.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'when entering data in a cell in Col A
On Error GoTo enditall
If Target.Cells.Column = 1 Then
n = Target.Row
If Excel.Range("A" & n).Value <> "" Then
Excel.Range("B" & n).Value = Now
End If
End If
enditall:
End Sub

Format Column B cells to time.

Note: the time stamp in B is non-volatile(will not change) unless you go back
and edit a value in column A.

Gord Dibben XL2002


On Sat, 18 Oct 2003 12:43:56 -0400, "Da Mann" <damann@NOSPAM
REMOVETHIS.fd2119.net> wrote:

>I was wondering if there's a way to add an automatic time stamp. What I'd
>like to do is to add a timestamp to a cell (say, B1) when an entry is made a
>seperate cell (say A1). Anyone have any ideas? My research, thus far, has
>been fruitless.
>
>Thank you!
>


 
Reply With Quote
 
Tom Ogilvy
Guest
Posts: n/a
 
      18th Oct 2003
Right click on the sheet tab and select view code.

Paste in code like this:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Count > 1 Then Exit Sub
If Target.Column = 1 Then
If Target.Value = "" Then Exit Sub
Target.Offset(0, 1).Value = Now
Target.Offset(0, 1).NumberFormat = "mm/dd/yyyy hh:mm"
Columns(2).AutoFit
End If
End Sub


--
Regards,
Tom Ogilvy


Da Mann <damann@NOSPAM REMOVETHIS.fd2119.net> wrote in message
news:uJKdnXrSpKvI8wyiRVn-(E-Mail Removed)...
> I was wondering if there's a way to add an automatic time stamp. What I'd
> like to do is to add a timestamp to a cell (say, B1) when an entry is made

a
> seperate cell (say A1). Anyone have any ideas? My research, thus far, has
> been fruitless.
>
> Thank you!
>
>



 
Reply With Quote
 
Gwav
Guest
Posts: n/a
 
      22nd Oct 2003
What is the procedure to create a formula to automatically engage Excel from
a dormant state? Such as first thing in the morning..




"Da Mann" <damann@NOSPAM REMOVETHIS.fd2119.net> wrote in message
news:uJKdnXrSpKvI8wyiRVn-(E-Mail Removed)...
> I was wondering if there's a way to add an automatic time stamp. What I'd
> like to do is to add a timestamp to a cell (say, B1) when an entry is made

a
> seperate cell (say A1). Anyone have any ideas? My research, thus far, has
> been fruitless.
>
> Thank you!
>
>



 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      22nd Oct 2003
Excel supports an "ontime" function that can run every xx minutes/hours/days,
but excel has to be open for it to keep track.

See Chip Pearson's page for more info:
http://www.cpearson.com/excel/ontime.htm

But I'm not sure if that's what you mean.

Gwav wrote:
>
> What is the procedure to create a formula to automatically engage Excel from
> a dormant state? Such as first thing in the morning..
>
> "Da Mann" <damann@NOSPAM REMOVETHIS.fd2119.net> wrote in message
> news:uJKdnXrSpKvI8wyiRVn-(E-Mail Removed)...
> > I was wondering if there's a way to add an automatic time stamp. What I'd
> > like to do is to add a timestamp to a cell (say, B1) when an entry is made

> a
> > seperate cell (say A1). Anyone have any ideas? My research, thus far, has
> > been fruitless.
> >
> > Thank you!
> >
> >


--

Dave Peterson
(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic Date Stamp Neon520 Microsoft Excel Programming 3 14th Jan 2009 10:04 PM
Comparing 2 files on date/time stamp, and based time difference do a subroutine info@stevik.nl Microsoft Excel Programming 1 28th Sep 2007 03:53 AM
Saving codes source file date-time stamp for run-time use =?Utf-8?B?a2VuQG5vc3BhbS5ub3NwYW0=?= Microsoft Dot NET Framework 4 24th Jan 2005 05:32 PM
Invalid date time stamp error every time winxp pro boots Harp Windows XP Setup 2 18th Jul 2004 07:01 PM
More on the automatic time stamp... Da Mann Microsoft Excel Discussion 1 23rd Oct 2003 11:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:16 PM.