A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Discussion (Misc queries)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to auto-enter date when cell is clicked?



 
 
Thread Tools Display Modes
  #1  
Old October 21st 05, 10:13 PM
Ron M.
external usenet poster
 
Posts: n/a
Default How to auto-enter date when cell is clicked?

My spreadsheet is on a shared server, and has several columns of data
entered by various people. These are columns D through L.

In the far right column, I want them to just be able to click on the
cell and that day's date appears. It needs to be static - not
auto-update every time the file is opened. It's in Column L. The top
cell is in Row 4.

When they enter or change data on a row, the date they did it needs to
appear in column L in that row.

The point is to keep their data entry time to an ABSOLUTE minimum. I
know they can select the cell and type control-;, but I'd like to
eliminate that step if at all possible. Each person will enter/change
data several thousand times over the year, so EVERY second I can shave
off the process helps.

Clicking in the cell to make the date appear would work fine, unless
there's a better approach out there.

Thanks very much,
Ron M.

Ads
  #2  
Old October 21st 05, 11:46 PM
Dave Peterson
external usenet poster
 
Posts: n/a
Default How to auto-enter date when cell is clicked?

Clicking on the cell won't work, but making a typing change could do it.

J.E. McGimpsey shows how at:
http://www.mcgimpsey.com/excel/timestamp.html

"Ron M." wrote:
>
> My spreadsheet is on a shared server, and has several columns of data
> entered by various people. These are columns D through L.
>
> In the far right column, I want them to just be able to click on the
> cell and that day's date appears. It needs to be static - not
> auto-update every time the file is opened. It's in Column L. The top
> cell is in Row 4.
>
> When they enter or change data on a row, the date they did it needs to
> appear in column L in that row.
>
> The point is to keep their data entry time to an ABSOLUTE minimum. I
> know they can select the cell and type control-;, but I'd like to
> eliminate that step if at all possible. Each person will enter/change
> data several thousand times over the year, so EVERY second I can shave
> off the process helps.
>
> Clicking in the cell to make the date appear would work fine, unless
> there's a better approach out there.
>
> Thanks very much,
> Ron M.


--

Dave Peterson
  #3  
Old October 22nd 05, 12:43 AM
Bob Phillips
external usenet poster
 
Posts: n/a
Default How to auto-enter date when cell is clicked?

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim ans As Long
On Error GoTo ws_exit:
Application.EnableEvents = False
With Target
If .Column = 12 And .Row >= 4 Then
.Value = Format(Date, "dd mmm yyyy")
End If
End With

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)


"Ron M." > wrote in message
ps.com...
> My spreadsheet is on a shared server, and has several columns of data
> entered by various people. These are columns D through L.
>
> In the far right column, I want them to just be able to click on the
> cell and that day's date appears. It needs to be static - not
> auto-update every time the file is opened. It's in Column L. The top
> cell is in Row 4.
>
> When they enter or change data on a row, the date they did it needs to
> appear in column L in that row.
>
> The point is to keep their data entry time to an ABSOLUTE minimum. I
> know they can select the cell and type control-;, but I'd like to
> eliminate that step if at all possible. Each person will enter/change
> data several thousand times over the year, so EVERY second I can shave
> off the process helps.
>
> Clicking in the cell to make the date appear would work fine, unless
> there's a better approach out there.
>
> Thanks very much,
> Ron M.
>



  #4  
Old October 22nd 05, 07:23 PM
Ron M.
external usenet poster
 
Posts: n/a
Default How to auto-enter date when cell is clicked?

Bob: that works, but some people have trouble with it. They click on
the cell and the date appears, true, but then if they hit return or
enter or the down or up arrow, it puts the date in THAT cell, too. If a
date was previously entered in that cell, it replaces it with the
current one.

I dunno, I think we'll just have to go with control-; .

Thanks,
Ron M.

  #5  
Old October 22nd 05, 08:32 PM
Bob Phillips
external usenet poster
 
Posts: n/a
Default How to auto-enter date when cell is clicked?

Do you want to check the entry, and if already present as a date, don't
overwrite? If so


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim ans As Long
On Error GoTo ws_exit:
Application.EnableEvents = False
With Target
If .Column = 12 And .Row >= 4 Then
If Not IsDate(.Value) Then
.Value = Format(Date, "dd mmm yyyy")
End If
End If
End With

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)


"Ron M." > wrote in message
oups.com...
> Bob: that works, but some people have trouble with it. They click on
> the cell and the date appears, true, but then if they hit return or
> enter or the down or up arrow, it puts the date in THAT cell, too. If a
> date was previously entered in that cell, it replaces it with the
> current one.
>
> I dunno, I think we'll just have to go with control-; .
>
> Thanks,
> Ron M.
>



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to update a cell if a specific date is included in a date rang mgavidia Setting up and Configuration of Excel 2 October 8th 05 12:53 AM
Excel 97 SR-1 / Set date in a cell-have day track in another cell mgb757 Excel Discussion (Misc queries) 1 September 20th 05 02:15 AM
HELP - Date Range In 1 Cell Calculation Adam Excel Worksheet Functions 6 September 19th 05 08:24 PM
Change cell color dependin on date ... T. Denford Excel Worksheet Functions 4 April 13th 05 01:59 AM
Changing Cell formats to date fields automatically PCLIVE Excel Worksheet Functions 3 April 12th 05 10:34 PM


All times are GMT +1. The time now is 01:44 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2004-2013 ExcelBanter.
The comments are property of their posters.