PC Review


Reply
Thread Tools Rate Thread

Default today's date - Excel 2000

 
 
Abay
Guest
Posts: n/a
 
      24th Aug 2005
How can I default to-day's date in one cell and the current time in another
for each row. I know I can press Cntrl + ; etc. but want the date to be
entered automatically.

Any help would be much appreciated.

Abay




 
Reply With Quote
 
 
 
 
Peo Sjoblom
Guest
Posts: n/a
 
      24th Aug 2005
=TODAY()

=NOW()

latter formatted as time or you'll get a date as well

--
Regards,

Peo Sjoblom

(No private emails please)


"Abay" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How can I default to-day's date in one cell and the current time in
> another for each row. I know I can press Cntrl + ; etc. but want the date
> to be entered automatically.
>
> Any help would be much appreciated.
>
> Abay
>
>
>
>


 
Reply With Quote
 
Abay
Guest
Posts: n/a
 
      24th Aug 2005
Thank you .. but is there a way to have them default, so that when you tab
from cell to cell the date and time are entered are entered automatically.
I have created a form for data entry and would like the date and time (both
are fields in the form) entered automatically as the user tabs from one
field to the other.

Am a newbie more or less at Excel .. know I can do this in Access, & am
hoping it can work in Excel also.

Again many thanks for your help.

Abay

"Peo Sjoblom" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> =TODAY()
>
> =NOW()
>
> latter formatted as time or you'll get a date as well
>
> --
> Regards,
>
> Peo Sjoblom
>
> (No private emails please)
>
>
> "Abay" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> How can I default to-day's date in one cell and the current time in
>> another for each row. I know I can press Cntrl + ; etc. but want the
>> date to be entered automatically.
>>
>> Any help would be much appreciated.
>>
>> Abay
>>
>>
>>
>>

>



 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      24th Aug 2005
You can do this with VBA, this assumes you want it in columns G and H when
you select G

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Const WS_RANGE As String = "G1:G1000"

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
.Value = Format(Date, "dd mmm yyyy")
.Offset(0, 1).Value = Format(Now, "hh:mm:ss")
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.

--


HTH

RP
(remove nothere from the email address if mailing direct)


"Abay" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thank you .. but is there a way to have them default, so that when you

tab
> from cell to cell the date and time are entered are entered automatically.
> I have created a form for data entry and would like the date and time

(both
> are fields in the form) entered automatically as the user tabs from one
> field to the other.
>
> Am a newbie more or less at Excel .. know I can do this in Access, & am
> hoping it can work in Excel also.
>
> Again many thanks for your help.
>
> Abay
>
> "Peo Sjoblom" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > =TODAY()
> >
> > =NOW()
> >
> > latter formatted as time or you'll get a date as well
> >
> > --
> > Regards,
> >
> > Peo Sjoblom
> >
> > (No private emails please)
> >
> >
> > "Abay" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> How can I default to-day's date in one cell and the current time in
> >> another for each row. I know I can press Cntrl + ; etc. but want the
> >> date to be entered automatically.
> >>
> >> Any help would be much appreciated.
> >>
> >> Abay
> >>
> >>
> >>
> >>

> >

>
>



 
Reply With Quote
 
Abay
Guest
Posts: n/a
 
      25th Aug 2005
That worked great when entering data directly into the spread sheet, no luck
when entering data in the form .. <sigh> ..

Many thanks again for your help.

Abay

"Bob Phillips" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You can do this with VBA, this assumes you want it in columns G and H when
> you select G
>
> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> Const WS_RANGE As String = "G1:G1000"
>
> On Error GoTo ws_exit:
> Application.EnableEvents = False
> If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
> With Target
> .Value = Format(Date, "dd mmm yyyy")
> .Offset(0, 1).Value = Format(Now, "hh:mm:ss")
> End With
> End If
>
> ws_exit:
> Application.EnableEvents = True
> End Sub
>
> 'This is worksheet event code, which means that it needs to be
> 'placed in the appropriate worksheet code module, not a standard
> 'code module. To do this, right-click on the sheet tab, select
> 'the View Code option from the menu, and paste the code in.
>
> --
>
>
> HTH
>
> RP
> (remove nothere from the email address if mailing direct)
>
>
> "Abay" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Thank you .. but is there a way to have them default, so that when you

> tab
>> from cell to cell the date and time are entered are entered
>> automatically.
>> I have created a form for data entry and would like the date and time

> (both
>> are fields in the form) entered automatically as the user tabs from one
>> field to the other.
>>
>> Am a newbie more or less at Excel .. know I can do this in Access, & am
>> hoping it can work in Excel also.
>>
>> Again many thanks for your help.
>>
>> Abay
>>
>> "Peo Sjoblom" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > =TODAY()
>> >
>> > =NOW()
>> >
>> > latter formatted as time or you'll get a date as well
>> >
>> > --
>> > Regards,
>> >
>> > Peo Sjoblom
>> >
>> > (No private emails please)
>> >
>> >
>> > "Abay" <(E-Mail Removed)> wrote in message
>> > news:(E-Mail Removed)...
>> >> How can I default to-day's date in one cell and the current time in
>> >> another for each row. I know I can press Cntrl + ; etc. but want the
>> >> date to be entered automatically.
>> >>
>> >> Any help would be much appreciated.
>> >>
>> >> Abay
>> >>
>> >>
>> >>
>> >>
>> >

>>
>>

>
>



 
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
Default to Today's date in a form Andy Microsoft Word Document Management 1 20th Jun 2008 06:49 AM
New tasks get a due date of today. How to default to no due date? =?Utf-8?B?QW5kcmV3IExheW1hbg==?= Microsoft Outlook Discussion 0 9th May 2007 09:31 PM
how do i set the tasks default due date to today? =?Utf-8?B?YXJ0ZW1pc3RyYWluZXI=?= Microsoft Outlook Discussion 2 30th Mar 2006 06:10 AM
Default date in Excel 2000 Jon Microsoft Excel Setup 3 10th Mar 2004 02:21 AM
Default Date: Today Cathy Myers Microsoft Excel Programming 6 21st Jul 2003 02:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:44 AM.