Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Code modification help

I found this code on the web for updating a cell with the time and date
whenever a specified range of cells is edited. In order to do this it is
using the Worksheet_change function. The code prints the time and date in the
cell beside the one that is changed. What I would like to do is have the time
and date printed in one, single specific cell. Can this be done ?

Here is the code....

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range("A2:A10"), .Cells) Is Nothing Then
Application.EnableEvents = False
If IsEmpty(.Value) Then
.Offset(0, 1).ClearContents
Else
With .Offset(0, 1)
.NumberFormat = "dd mmm yyyy hh:mm:ss"
.Value = Now
End With
End If
Application.EnableEvents = True
End If
End With
End Sub

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
Modification of a .CSV file [email protected] Excel Discussion (Misc queries) 6 April 23rd 07 09:11 PM
line code modification TUNGANA KURMA RAJU Excel Discussion (Misc queries) 3 March 2nd 07 01:12 PM
last modification Chip Smith Excel Discussion (Misc queries) 1 June 19th 06 11:55 PM
MODIFICATION IS NOT ALLOWED lisasbulldogs Excel Worksheet Functions 1 May 31st 06 06:27 PM
Formula Modification Help Dmorri254 Excel Worksheet Functions 4 November 15th 04 07:06 PM


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