PC Review


Reply
Thread Tools Rate Thread

Automatic Date and Times

 
 
D. West
Guest
Posts: n/a
 
      15th Aug 2008
I would like to have the current date and time automatically populate in the
first column when anything else is entered on the same row. I am not
proficient with macros, etc., so I will need detailed info. Any help is
certainly appreciated!

Denise
 
Reply With Quote
 
 
 
 
Otto Moehrbach
Guest
Posts: n/a
 
      15th Aug 2008
Denise
You would use a Worksheet_Change event macro. The possible problem is
that this macro will fire (execute) whenever ANY change is made to the
contents of ANY cell in the entire sheet. You can write code (the
instructions in the macro) to do some action only if the target cell (the
cell that changed) is within some range. Doing so will keep the date/time
from being inserted when you are doing things in some other part of the
sheet. Can you provide some details about the range in which you want this
to happen?
The macro would look something like the following. I chose A1:N100 as the
range you want. Note that such a macro MUST be placed in the sheet module
of the sheet in which you want this to happen. To access that module,
right-click the sheet tab, and select View Code. Paste this macro into that
module. "X" out of the module to return to your sheet. HTH Otto
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("A1:N100")) Is Nothing Then
If IsEmpty(Target.Value) Then Exit Sub
Application.EnableEvents = False
Cells(Target.Row, 1).Value = Now
Application.EnableEvents = True
End If
End Sub
"D. West" <(E-Mail Removed)> wrote in message
news:A185BE5A-FD8F-4C91-B4AF-(E-Mail Removed)...
>I would like to have the current date and time automatically populate in
>the
> first column when anything else is entered on the same row. I am not
> proficient with macros, etc., so I will need detailed info. Any help is
> certainly appreciated!
>
> Denise


 
Reply With Quote
 
Gary Brown
Guest
Posts: n/a
 
      15th Aug 2008
Assuming 'the first column' is Column A, You can use something like this.
=IF(COUNTA(B3:IV3)<>0,NOW(),"")
Format Column A for your desired date/time format.
--
Hope this helps.
Thanks in advance for your feedback.
Gary Brown


"D. West" wrote:

> I would like to have the current date and time automatically populate in the
> first column when anything else is entered on the same row. I am not
> proficient with macros, etc., so I will need detailed info. Any help is
> certainly appreciated!
>
> Denise

 
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
Re: Automatic Updates occurring at times other than scheduled Shenan Stanley Windows XP Performance 0 27th Feb 2009 05:07 AM
Macro automatic execution x times =?Utf-8?B?Q3JhaWc=?= Microsoft Excel Programming 6 5th Feb 2007 11:38 AM
How to change outlook calendar automatic end times? =?Utf-8?B?Z2JjNDk=?= Microsoft Outlook Calendar 2 20th Mar 2006 03:38 PM
Windows XP Automatic Update Patch 819696 Installed 56 Times Mark Windows XP Security 0 28th Apr 2004 02:22 AM
automatic shut on and off times Auburnwad Windows XP Work Remotely 1 8th Oct 2003 02:51 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:02 PM.