LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
nastech
 
Posts: n/a
Default Auto Date Script..

Hello, I have the following code, but not sure how to exclude top few lines
(as header) from being affected, to modify range.. thanks

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Me.Range("AJ:AJ"), .Cells) Is Nothing Then
Application.EnableEvents = False
With Me.Cells(.Row, "AG")
.NumberFormat = "dd"
.Value = Now
End With
Application.EnableEvents = True
End If
If Not Intersect(Me.Range("AO:AR"), .Cells) Is Nothing Then
Application.EnableEvents = False
With Me.Cells(.Row, "AU")
.NumberFormat = "dd"
.Value = Now
End With
Application.EnableEvents = True
End If
End With
End Sub


 
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 date script for 2 columns? have 1.. nastech Excel Discussion (Misc queries) 2 November 22nd 05 03:10 PM
How do I calculate if a date is in a certain time frame? Pe66les Excel Worksheet Functions 19 August 27th 05 11:07 PM
Recurring annual events using a specific date as a trigger date Bamboozled Excel Worksheet Functions 1 June 6th 05 01:44 PM
Making a auto date entered into a cell permanent from a template Muncher Excel Discussion (Misc queries) 2 May 26th 05 11:07 PM
Auto date changing in Excel is maddening brhicks Charts and Charting in Excel 3 December 16th 04 02:54 PM


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