LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default how to make auto date update work on a range of cells.

Try the below

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("D:D")) Is Nothing Then
Target.Offset(0, 1) = Format$(Now, "dd/mm/yy hh:mm")
End If
Application.EnableEvents = True
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"cashnic" wrote:

Sorry, very new to formulas and code. The code below will populate a cell
with the update date/time when the cell next to it is updated. Works
GREAT...on that one cell! How do I apply this code to an entire column? I'm
sure I need to enter a range of cells somehow into this code but I don't know
how to do this.

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$D$7" Then
Target.Offset(0, 1) = Format$(Now, "dd/mm/yy hh:mm")
End If
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
Clarification - how to automatically update cells with a date and date range Bekki Excel Discussion (Misc queries) 1 August 31st 10 03:18 AM
auto update of date gibbs Excel Worksheet Functions 1 February 23rd 08 02:24 AM
Auto Sum a Range of Cells based on the date jcpotwor Excel Discussion (Misc queries) 3 January 17th 07 07:20 PM
How do I make a name formula auto update in Excel Sammy Soup Excel Worksheet Functions 3 December 30th 04 05:18 PM
Auto refresh and DDE update is not work when running macro Eddy[_5_] Excel Programming 0 July 13th 04 10:08 AM


All times are GMT +1. The time now is 01:08 PM.

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"