Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Date Value auto filled in

I have a huge spreadhseet and I need a worksheet change event to
populate a target cell in column(AB) with today's date value, if
anything gets added to target cells in columns(O:X). In other words, if
O22 has something filled in AB22 would have today's date value. If at a
later date S22 gets something filled in AB22 would update to the
current date. TIA

Greg

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Date Value auto filled in

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("O:X")) Is Nothing Then
With Target
Cells(Target.Row, "AB") = 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

"GregR" wrote in message
ups.com...
I have a huge spreadhseet and I need a worksheet change event to
populate a target cell in column(AB) with today's date value, if
anything gets added to target cells in columns(O:X). In other words, if
O22 has something filled in AB22 would have today's date value. If at a
later date S22 gets something filled in AB22 would update to the
current date. TIA

Greg



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Date Value auto filled in

Bob, thanks for your prompt and accurate reply.

Greg

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
Auto Insert the present time when a cell is filled with a data, Dinanath New Users to Excel 2 March 8th 09 08:28 PM
Auto insert new row after current row filled in Capsaisin Excel Discussion (Misc queries) 1 May 18th 06 11:46 PM
Color filled in auto but from where Cindi Excel Worksheet Functions 3 March 3rd 06 01:31 PM
How do I auto fill long col. filling blanks with last filled cell MBBeginner Excel Discussion (Misc queries) 3 January 15th 06 12:44 AM
Hiding a row if date is filled nkt122866 Excel Worksheet Functions 1 September 15th 05 02:18 PM


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