A Microsoft Office (Excel, Word) forum. OfficeFrustration

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 » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

insert date



 
 
Thread Tools Display Modes
  #1  
Old June 23rd, 2006, 03:41 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default insert date

Hi folks,
I'd like to inset a date automatically when ever a cell within a single
column is selected.
Can I do this?
  #2  
Old June 23rd, 2006, 04:08 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default insert date

A couple of questions.....
1-Are you wanting today's date inserted in an empty cell whenever it's
selected in a certain column?
2-What would you like to have happen to cells in that column being selected
that already contain a date, or some other value?

You can do nearly as good by just holding down the Ctrl key and pressing the
semicolon key.........this will insert today's date in the selected cell.

hth
Vaya con Dios,
Chuck, CABGx3

"Larry" wrote:

Hi folks,
I'd like to inset a date automatically when ever a cell within a single
column is selected.
Can I do this?

  #3  
Old June 23rd, 2006, 04:10 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default insert date

Larry,
A worksheet event would handle this.

Take a look at

http://www.cpearson.com/excel/events.htm

Come back if you need more help.

"Larry" wrote:

Hi folks,
I'd like to inset a date automatically when ever a cell within a single
column is selected.
Can I do this?

  #4  
Old June 23rd, 2006, 08:58 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default insert date

Hey, I appreciate the help. I have been using the ctrl key, I have folks that
don't seem to be able to remember this feature. The cells with existing past
dates should remain unchanged, only the newest empty cell will be selected,
if it auto populated the date it would make some others happy. Thanks for the
feedback!

"Toppers" wrote:

Larry,
A worksheet event would handle this.

Take a look at

http://www.cpearson.com/excel/events.htm

Come back if you need more help.

"Larry" wrote:

Hi folks,
I'd like to inset a date automatically when ever a cell within a single
column is selected.
Can I do this?

  #5  
Old June 23rd, 2006, 09:05 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default insert date

Thanks CLR,
ans: yes and old dates remain.
Some of the folks usimng it can't seem to remember the ctrl ; keys. Thanks
for the help


"CLR" wrote:

A couple of questions.....
1-Are you wanting today's date inserted in an empty cell whenever it's
selected in a certain column?
2-What would you like to have happen to cells in that column being selected
that already contain a date, or some other value?

You can do nearly as good by just holding down the Ctrl key and pressing the
semicolon key.........this will insert today's date in the selected cell.

hth
Vaya con Dios,
Chuck, CABGx3

"Larry" wrote:

Hi folks,
I'd like to inset a date automatically when ever a cell within a single
column is selected.
Can I do this?

  #6  
Old June 26th, 2006, 12:53 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default insert date

This Change-event macro should do the job automatically......if the user
selects a cell in column that has a value therein, no affect.....if the cell
is blank, the macro will insert todays date.


Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Automatically inserts today's date in cell in column A when selected
'if the cell was empty. Does not overwrite occupied cell.
If ActiveCell.Column = 1 Then 'Limits macro action to column A
If ActiveCell.Value = "" Then 'Check to see if Target cell empty
Selection.Value = Date 'Insert today's date in Target cell
Else
End If
Else
End If
End Sub

"Larry" wrote:

Thanks CLR,
ans: yes and old dates remain.
Some of the folks usimng it can't seem to remember the ctrl ; keys. Thanks
for the help


"CLR" wrote:

A couple of questions.....
1-Are you wanting today's date inserted in an empty cell whenever it's
selected in a certain column?
2-What would you like to have happen to cells in that column being selected
that already contain a date, or some other value?

You can do nearly as good by just holding down the Ctrl key and pressing the
semicolon key.........this will insert today's date in the selected cell.

hth
Vaya con Dios,
Chuck, CABGx3

"Larry" wrote:

Hi folks,
I'd like to inset a date automatically when ever a cell within a single
column is selected.
Can I do this?

  #7  
Old June 26th, 2006, 01:36 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default insert date

Thanks again for the great help, I'll try this right away; I take it I
replace the A with C to change target column? Take care, larry

"CLR" wrote:

This Change-event macro should do the job automatically......if the user
selects a cell in column that has a value therein, no affect.....if the cell
is blank, the macro will insert todays date.


Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Automatically inserts today's date in cell in column A when selected
'if the cell was empty. Does not overwrite occupied cell.
If ActiveCell.Column = 1 Then 'Limits macro action to column A
If ActiveCell.Value = "" Then 'Check to see if Target cell empty
Selection.Value = Date 'Insert today's date in Target cell
Else
End If
Else
End If
End Sub

"Larry" wrote:

Thanks CLR,
ans: yes and old dates remain.
Some of the folks usimng it can't seem to remember the ctrl ; keys. Thanks
for the help


"CLR" wrote:

A couple of questions.....
1-Are you wanting today's date inserted in an empty cell whenever it's
selected in a certain column?
2-What would you like to have happen to cells in that column being selected
that already contain a date, or some other value?

You can do nearly as good by just holding down the Ctrl key and pressing the
semicolon key.........this will insert today's date in the selected cell.

hth
Vaya con Dios,
Chuck, CABGx3

"Larry" wrote:

Hi folks,
I'd like to inset a date automatically when ever a cell within a single
column is selected.
Can I do this?

  #8  
Old June 26th, 2006, 01:37 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default insert date

Thanks again, I'll try thei right away. I take it I should replace A with C
to change target column? Take care, larry

"CLR" wrote:

This Change-event macro should do the job automatically......if the user
selects a cell in column that has a value therein, no affect.....if the cell
is blank, the macro will insert todays date.


Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Automatically inserts today's date in cell in column A when selected
'if the cell was empty. Does not overwrite occupied cell.
If ActiveCell.Column = 1 Then 'Limits macro action to column A
If ActiveCell.Value = "" Then 'Check to see if Target cell empty
Selection.Value = Date 'Insert today's date in Target cell
Else
End If
Else
End If
End Sub

"Larry" wrote:

Thanks CLR,
ans: yes and old dates remain.
Some of the folks usimng it can't seem to remember the ctrl ; keys. Thanks
for the help


"CLR" wrote:

A couple of questions.....
1-Are you wanting today's date inserted in an empty cell whenever it's
selected in a certain column?
2-What would you like to have happen to cells in that column being selected
that already contain a date, or some other value?

You can do nearly as good by just holding down the Ctrl key and pressing the
semicolon key.........this will insert today's date in the selected cell.

hth
Vaya con Dios,
Chuck, CABGx3

"Larry" wrote:

Hi folks,
I'd like to inset a date automatically when ever a cell within a single
column is selected.
Can I do this?

  #9  
Old June 26th, 2006, 01:49 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default insert date

Actually, to change from column A to column C, you would change the line
from:
If ActiveCell.Column = 1
To:
If ActiveCell.Column = 3

The two "columnA" in the notations can be changed also, but are only
comments and do not affect the operation

Vaya con Dios
Chuck, CABGx3



"Larry" wrote:

Thanks again, I'll try thei right away. I take it I should replace A with C
to change target column? Take care, larry

"CLR" wrote:

This Change-event macro should do the job automatically......if the user
selects a cell in column that has a value therein, no affect.....if the cell
is blank, the macro will insert todays date.


Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Automatically inserts today's date in cell in column A when selected
'if the cell was empty. Does not overwrite occupied cell.
If ActiveCell.Column = 1 Then 'Limits macro action to column A
If ActiveCell.Value = "" Then 'Check to see if Target cell empty
Selection.Value = Date 'Insert today's date in Target cell
Else
End If
Else
End If
End Sub

"Larry" wrote:

Thanks CLR,
ans: yes and old dates remain.
Some of the folks usimng it can't seem to remember the ctrl ; keys. Thanks
for the help


"CLR" wrote:

A couple of questions.....
1-Are you wanting today's date inserted in an empty cell whenever it's
selected in a certain column?
2-What would you like to have happen to cells in that column being selected
that already contain a date, or some other value?

You can do nearly as good by just holding down the Ctrl key and pressing the
semicolon key.........this will insert today's date in the selected cell.

hth
Vaya con Dios,
Chuck, CABGx3

"Larry" wrote:

Hi folks,
I'd like to inset a date automatically when ever a cell within a single
column is selected.
Can I do this?

  #10  
Old June 27th, 2006, 01:36 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default insert date

Goodmorning Chuck,
I have been trying to get the code you posted to work in my workbook but so
far have not. I did change the "1" to a "3", that's all. I pasted this code
into the "This workbook" with some other code I have:

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Automatically inserts today's date in cell in column C when selected
'if the cell was empty. Does not overwrite occupied cell.
If ActiveCell.Column = 3 Then 'Limits macro action to column C
If ActiveCell.Value = "" Then 'Check to see if Target cell empty
Selection.Value = Date 'Insert today's date in Target cell
Else
End If
Else
End If



Sub Workbook_Open()
Columns("E:IV").Select
Selection.EntireColumn.Hidden = True
MsgBox "If you are entering a new waiver item, go ahead and enter it in the
next open line. When you are ready for a waiver number click in the empty box
and it will take you to the new waiver number generator; Follow the
instructions in the box there. To get a current date just select the empty
date box and hold down the Ctrl and ; keys, a new date will appear! When you
are done just click the RED X at the upper right to close, it will
automatically save your entries and the next time you need a number for any
waiver card the same steps will be taken: YOU NEED TO CLICK OK TO START
ENTERING DATA"
ThisWorkbook.Save
End Sub
noJoy

I then placed it into an existing module 1above this code:

Sub Workbook_Open()
Columns("B:B").Select
Range("B3").Activate
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="WAIVER%20NO.xls", _
TextToDisplay:=""

End Sub\
again, no joy
I next created a new module and pasted there and still no luck.

I am just too much of a novice to do this in a timely manner; Any more help?
Thanks man. larry
************************************


"CLR" wrote:

Actually, to change from column A to column C, you would change the line
from:
If ActiveCell.Column = 1
To:
If ActiveCell.Column = 3

The two "columnA" in the notations can be changed also, but are only
comments and do not affect the operation

Vaya con Dios
Chuck, CABGx3



"Larry" wrote:

Thanks again, I'll try thei right away. I take it I should replace A with C
to change target column? Take care, larry

"CLR" wrote:

This Change-event macro should do the job automatically......if the user
selects a cell in column that has a value therein, no affect.....if the cell
is blank, the macro will insert todays date.


Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Automatically inserts today's date in cell in column A when selected
'if the cell was empty. Does not overwrite occupied cell.
If ActiveCell.Column = 1 Then 'Limits macro action to column A
If ActiveCell.Value = "" Then 'Check to see if Target cell empty
Selection.Value = Date 'Insert today's date in Target cell
Else
End If
Else
End If
End Sub

"Larry" wrote:

Thanks CLR,
ans: yes and old dates remain.
Some of the folks usimng it can't seem to remember the ctrl ; keys. Thanks
for the help


"CLR" wrote:

A couple of questions.....
1-Are you wanting today's date inserted in an empty cell whenever it's
selected in a certain column?
2-What would you like to have happen to cells in that column being selected
that already contain a date, or some other value?

You can do nearly as good by just holding down the Ctrl key and pressing the
semicolon key.........this will insert today's date in the selected cell.

hth
Vaya con Dios,
Chuck, CABGx3

"Larry" wrote:

Hi folks,
I'd like to inset a date automatically when ever a cell within a single
column is selected.
Can I do this?

 




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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding info to query mjj4golf Running & Setting Up Queries 20 January 9th, 2006 02:29 AM
Copy Cat Ain't Working shep Setting Up & Running Reports 15 September 12th, 2005 05:14 PM
Query for 'confirmation' rogge Running & Setting Up Queries 8 April 19th, 2005 03:26 PM
Automatically Insert DATE, so that DATE will NOT change Cie Worksheet Functions 4 April 4th, 2005 05:51 PM
Aggregating Date Data into Weeks and Quarters Roger Running & Setting Up Queries 3 July 11th, 2004 05:56 PM


All times are GMT +1. The time now is 08:43 AM.


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