#1   Report Post  
colm1976
 
Posts: n/a
Default Absolute Dates

I WOULD LIKE TO CREATE A WORKSHEET WHERE THE DATE IS AUTOMATICALLY PUT INTO A
CELL WHENEVER THE OPERATOR INPUTS INFORMATION INTO ANOTHER CELL... I.E. CELL
A IS THE DATE OF INPUT... CELL B IS WHERE THE OPERATOR INPUTS INFORMATION...
BUT I DON'T WANT TO HAVE THE OPERATOR INPUT THE DATEE - NOR DO I WANT IT
REFRESHED EVERY TIME I OPEN THE FILE... ANY HELP???? THANKS IN ADVANCE!
  #2   Report Post  
colm1976
 
Posts: n/a
Default

Thank you for the reply. I have not pasted code before. I found the section
to paste but do not know how to activate it. Column A is the date field and
column F is where the text is being entered. Thank you in advance.

"Bob Phillips" wrote:

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A1:H10"

On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Column = 2 Then
Target.Offset(0, -1).Value = Format(Date, "dd mmm yyyy")
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)


"colm1976" wrote in message
...
I WOULD LIKE TO CREATE A WORKSHEET WHERE THE DATE IS AUTOMATICALLY PUT

INTO A
CELL WHENEVER THE OPERATOR INPUTS INFORMATION INTO ANOTHER CELL... I.E.

CELL
A IS THE DATE OF INPUT... CELL B IS WHERE THE OPERATOR INPUTS

INFORMATION...
BUT I DON'T WANT TO HAVE THE OPERATOR INPUT THE DATEE - NOR DO I WANT IT
REFRESHED EVERY TIME I OPEN THE FILE... ANY HELP???? THANKS IN ADVANCE!




  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A1:H10"

On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Column = 2 Then
Target.Offset(0, -1).Value = Format(Date, "dd mmm yyyy")
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)


"colm1976" wrote in message
...
I WOULD LIKE TO CREATE A WORKSHEET WHERE THE DATE IS AUTOMATICALLY PUT

INTO A
CELL WHENEVER THE OPERATOR INPUTS INFORMATION INTO ANOTHER CELL... I.E.

CELL
A IS THE DATE OF INPUT... CELL B IS WHERE THE OPERATOR INPUTS

INFORMATION...
BUT I DON'T WANT TO HAVE THE OPERATOR INPUT THE DATEE - NOR DO I WANT IT
REFRESHED EVERY TIME I OPEN THE FILE... ANY HELP???? THANKS IN ADVANCE!



  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

Use this code then. The date will be input every time you enter datat in F.

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Column = 6 Then
Target.Offset(0, -5).Value = Format(Date, "dd mmm yyyy")
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)


"colm1976" wrote in message
...
Thank you for the reply. I have not pasted code before. I found the

section
to paste but do not know how to activate it. Column A is the date field

and
column F is where the text is being entered. Thank you in advance.

"Bob Phillips" wrote:

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A1:H10"

On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Column = 2 Then
Target.Offset(0, -1).Value = Format(Date, "dd mmm yyyy")
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)


"colm1976" wrote in message
...
I WOULD LIKE TO CREATE A WORKSHEET WHERE THE DATE IS AUTOMATICALLY PUT

INTO A
CELL WHENEVER THE OPERATOR INPUTS INFORMATION INTO ANOTHER CELL...

I.E.
CELL
A IS THE DATE OF INPUT... CELL B IS WHERE THE OPERATOR INPUTS

INFORMATION...
BUT I DON'T WANT TO HAVE THE OPERATOR INPUT THE DATEE - NOR DO I WANT

IT
REFRESHED EVERY TIME I OPEN THE FILE... ANY HELP???? THANKS IN

ADVANCE!





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
2 digit year in dates return 19xx not 20xx moranbo Excel Discussion (Misc queries) 1 September 7th 05 01:44 AM
Default Dates Sue Excel Discussion (Misc queries) 1 July 22nd 05 12:29 PM
Using dates for x-axis values as string instead of creating a scale cs_weirdo Charts and Charting in Excel 2 June 17th 05 12:20 AM
replace absolute references bj Excel Worksheet Functions 0 May 20th 05 07:18 PM
Formating Dates for production schedule dpl7579 Excel Discussion (Misc queries) 1 January 11th 05 08:43 PM


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