View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.newusers
Shane Devenshire[_2_] Shane Devenshire[_2_] is offline
external usenet poster
 
Posts: 3,346
Default Static Date and Time in Excel 2007

Hi,

Well that question leads to a problem - suppose you enter data in A1 then
the date is entered in B1, but now B1 has something in it so C1 gets a date,
and so on and so on.

Now lets suppose you want to do this only for entries made in column A then

Right-click the sheet tab and paste in the following code.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim Isect As Range
Set Isect = Application.Intersect(Target, [A:A])
If Not Isect Is Nothing Then
Target.Offset(0, 1) = Now
End If
End Sub
--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"MilleniumPro" wrote:

Hello all,

I have googled around and have not been able to find the answer on the
following:

I am looking to have a cell that automatically populates the current date
and time and leave that information STATIC in that cell once populated when
an adjacent cell has a value entered into it. The only answers I fould were
for excel 2000 and 2003. I am using 2007 and I am totally lost with the new
menu system that has been implemented here. If this requires a macro, please
help me walk through how to enter the area where the macros is to be enter
along with any supporting code. Thanks to anyone in advance that can help.