Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Setup / October 2005

Tip: Looking for answers? Try searching our database.

putting dates next to entries

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
peter - 22 Oct 2005 01:34 GMT
I don't know Excel too well.  I have a running spreadsheet with new
entries each day.  Is there a way that I can have Excel automatically
put the date in the next column?  Whenever a cell in entered or
modified, it would enter that date in the next cell.

Thanks,

Peter
Gary''s Student - 22 Oct 2005 11:20 GMT
Hi Peter:

The easy way to enter the date is to click on the cell and type CNTRL ;

It can be done automatically, but that requires VBA coding
Signature

Gary''s Student

> I don't know Excel too well.  I have a running spreadsheet with new
> entries each day.  Is there a way that I can have Excel automatically
[quoted text clipped - 4 lines]
>
> Peter
Gord Dibben - 22 Oct 2005 19:14 GMT
Peter

This would require event code behind the worksheet.

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 = Date
       End If
   End If
enditall:
Application.EnableEvents = True
End Sub

To implement this..............

Right-click on the sheet tab and "View Code".

Copy/paste the above event code into that module.

Whenever you enter or edit data in any cell in column A, the date will be
entered in column B

Gord Dibben Excel MVP

>I don't know Excel too well.  I have a running spreadsheet with new
>entries each day.  Is there a way that I can have Excel automatically
[quoted text clipped - 4 lines]
>
>Peter
peter - 22 Oct 2005 19:48 GMT
Hey Gord, that worked real well for columns a  and b.  How do I do it
if I need the same thing in other coulmns?

Thanks!

Peter
Gord Dibben - 22 Oct 2005 20:27 GMT
Peter

That would depend upon what your "other columns" are and where you would like
to have the timestamp entered.

In the code provided, you could change the Target.Cells.Column = 1 to another
column number.

The "A" and "B" can be altered.

Have a look at John McGimpsey's site on this subject.

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

Specifically the DateTimeStamp Macro which can be called by event code.

Gord

>Hey Gord, that worked real well for columns a  and b.  How do I do it
>if I need the same thing in other coulmns?
>
>Thanks!
>
>Peter
peter - 22 Oct 2005 22:45 GMT
Works like a charm, Gord!  Thank you so much!

Peter
Gord Dibben - 23 Oct 2005 18:43 GMT
Thanks for the feedback Peter.

Gord

>Works like a charm, Gord!  Thank you so much!
>
>Peter
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.