Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default static automatic date

I want an automatic date generation in a particular cell when a value in the
cell adjacent to it is filled. But I want the date to be static, i.e. if it
is calculated it doesn't change. Can I do this with excel please?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default static automatic date

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("H1:H10")) Is Nothing Then
With Target
.Offset(0, 1).Value = Format(Date, "dd mmm yyyy")
End With
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

Bob Phillips

"Jeanette" wrote in message
...
I want an automatic date generation in a particular cell when a value in

the
cell adjacent to it is filled. But I want the date to be static, i.e. if

it
is calculated it doesn't change. Can I do this with excel please?

Thanks



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
DAYS360 where Start Date is Static and End Date is Latter of Two Dates Aimee Shaw Excel Discussion (Misc queries) 1 December 28th 09 10:34 PM
Static date robert morris Excel Discussion (Misc queries) 9 November 22nd 08 01:37 AM
How do I set a static date? Shawn Excel Worksheet Functions 5 August 28th 08 03:51 AM
static date Alan g1bdu Excel Worksheet Functions 2 July 3rd 07 12:35 AM
Automatic update of date once, then remains static mfdc_frank Excel Worksheet Functions 5 October 5th 06 12:16 AM


All times are GMT +1. The time now is 06:41 AM.

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

About Us

"It's about Microsoft Excel"