Thread: Auto Date
View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
Nick Hodge Nick Hodge is offline
external usenet poster
 
Posts: 1,173
Default Auto Date

Ken

Try this

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Columns("B:B")) Is Nothing Then
Target.Offset(0, -1).Value = Now
End If
If Not Application.Intersect(Target, Columns("G:G")) Is Nothing Then
Target.Offset(0, -1).Value = Now
End If
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Ken McGonagle" wrote in message
...
It's not working. once I add the info for G it stops altogether.

"Nick Hodge" wrote:

Ken

Adding a comma and

Columns("G;G")

so the line reads

If Not Application.Intersect(Target, Columns("B:B"),Columns("G:G")) Is
Nothing Then


Should do it
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Ken McGonagle" wrote in message
...
Thank you so much!
Now how would I enter the code if I also wanted to do the same thing
for
Columns F & G. When something gets entered into G it puts the date in
F.

"Nick Hodge" wrote:

Ken

You could use a worksheet_change event. Right click the worksheet tab
and
select 'view code' and paste this in the resulting window. Close and
save,
now whenever you enter something in B the date/time stamp will appear
in
A
alongside

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Columns("B:B")) Is Nothing Then
Target.Offset(0, -1).Value = Now()
End If
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Ken McGonagle" wrote in
message
...
I have a Spreadsheet that I use to track incoming orders from
customers.
Column A is used for the date I receive the order. Is there a way
to
say
if
anything is typed in column B to automatically enter that days date
and
current time into whatever the corresponding cell is in column A?