Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 133
Default How do I automatically enter a time and date?

I am trying to track calls that my sales staff makes on leads that I supply
them. Can anyone tell me how to set a column that automatically inserts a
date and time by just clicking on it? For example:
Name Of Borrower Lead Source Date and Time Called Result Notes

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How do I automatically enter a time and date?

Either of two methods for automatic entry.

1. Double-click on a cell to enter time and date.

2. Enter data in one cell and date and time appear in another cell.

Manually...........Hold CTRL + ; then <space then CTRL + SHIFT + ; then ENTER

Post back for event code for 1 or 2

2 is easist........no clicking.


Gord Dibben MS Excel MVP

On Fri, 28 Sep 2007 11:31:02 -0700, Wayne
wrote:

I am trying to track calls that my sales staff makes on leads that I supply
them. Can anyone tell me how to set a column that automatically inserts a
date and time by just clicking on it? For example:
Name Of Borrower Lead Source Date and Time Called Result Notes


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default How do I automatically enter a time and date?

Double-click is better. Say we use column C for this purpose. In worksheet
code, enter the following macro:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Set r = Range("C:C")
If Intersect(Target, r) Is Nothing Then Exit Sub
Target.Value = Now
Cancel = True
End Sub

REMEMBER: worksheet code, not a standard module
--
Gary''s Student - gsnu200747


"Wayne" wrote:

I am trying to track calls that my sales staff makes on leads that I supply
them. Can anyone tell me how to set a column that automatically inserts a
date and time by just clicking on it? For example:
Name Of Borrower Lead Source Date and Time Called Result Notes

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 133
Default How do I automatically enter a time and date?

Thank you so much for responding...however, bear in mind that I am
"technologically challenged"! Can you send more detailed instructions on
where to find "worksheet code"? I can copy the macro, but do I start with
"Private" and end with "end sub"?

"Gary''s Student" wrote:

Double-click is better. Say we use column C for this purpose. In worksheet
code, enter the following macro:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Set r = Range("C:C")
If Intersect(Target, r) Is Nothing Then Exit Sub
Target.Value = Now
Cancel = True
End Sub

REMEMBER: worksheet code, not a standard module
--
Gary''s Student - gsnu200747


"Wayne" wrote:

I am trying to track calls that my sales staff makes on leads that I supply
them. Can anyone tell me how to set a column that automatically inserts a
date and time by just clicking on it? For example:
Name Of Borrower Lead Source Date and Time Called Result Notes

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default How do I automatically enter a time and date?


Because it is worksheet code, it is very easy to install and automatic to use:

1. right-click the tab name near the bottom of the Excel window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you have any concerns, first try it on a trial worksheet.

If you save the workbook, the macro will be saved with it.


To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm



You are also correct about the beginning and ending lines.
--
Gary''s Student - gsnu200747


"Wayne" wrote:

Thank you so much for responding...however, bear in mind that I am
"technologically challenged"! Can you send more detailed instructions on
where to find "worksheet code"? I can copy the macro, but do I start with
"Private" and end with "end sub"?

"Gary''s Student" wrote:

Double-click is better. Say we use column C for this purpose. In worksheet
code, enter the following macro:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Set r = Range("C:C")
If Intersect(Target, r) Is Nothing Then Exit Sub
Target.Value = Now
Cancel = True
End Sub

REMEMBER: worksheet code, not a standard module
--
Gary''s Student - gsnu200747


"Wayne" wrote:

I am trying to track calls that my sales staff makes on leads that I supply
them. Can anyone tell me how to set a column that automatically inserts a
date and time by just clicking on it? For example:
Name Of Borrower Lead Source Date and Time Called Result Notes

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
Enter text automatically based on current time jmj713 Excel Discussion (Misc queries) 3 September 7th 07 04:18 PM
Can I automatically enter the current date or current time into a Ben New Users to Excel 7 October 19th 05 03:38 PM
Excel to automatically enter a date Jim Excel Worksheet Functions 1 June 11th 05 07:12 PM
how to enter the date automatically? Jahcureus Excel Discussion (Misc queries) 4 May 13th 05 09:10 PM
Automatically enter date and time but only update once. PM New Users to Excel 3 January 21st 05 07:47 AM


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