View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Larry Larry is offline
external usenet poster
 
Posts: 30
Default is there a way to post dates without enetering 1 by 1 into cell

Hi Dustin, I'm a newbie too, been learnin' a lot here though.
I have this little bit of code that will enter the current date in a cell
when clicked, though you can put any date you want in that cell (until you
click it again, thenit goes to current) here it is:

'Automatically inserts today's date in cell in column C when selected
'if the cell was empty. Does not overwrite occupied cell. If you want a
different column then change the "ActiveCell.column= XX" to whatever number
you want.
i.e. A=1B=2C=3etc.

Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
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
End If
Else
End If
End Sub

Hope this helps you some, larry


"dustin" wrote:

im looking for a way to enter dates for a whole Fiscal Year without entering
each date one by one into the A column. Or any ways to post a whole month at
a time.