#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Auto Date

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?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,173
Default Auto Date

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?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Auto Date

J.E. McGimpsey shows a way to put a time stamp on the same row when something
changes:

http://www.mcgimpsey.com/excel/timestamp.html

Ken McGonagle wrote:

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?


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Auto Date

You would want a static date entered.

Event code is required for this.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 2 Then
n = Target.Row
If Excel.Range("B" & n).Value < "" Then
Excel.Range("A" & n).Value = Now
End If
End If
enditall:
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code".

Copy/paste the above into that sheet module.


Gord Dibben MS Excel MVP

On Tue, 5 Dec 2006 09:58:00 -0800, Ken McGonagle
wrote:

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?


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Auto Date

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?




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,173
Default Auto Date

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?



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Auto Date

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?


  #8   Report Post  
Posted to microsoft.public.excel.misc
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?



  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Auto Date

Nick
That did it. You are the man! Thanks Again.

Ken

"Nick Hodge" wrote:

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?



  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Auto Date

How would i use this statement if the criteria is on a different sheet? So
if a value is entered on sheet Joe!H4, then on Sheet3 H4 would have the date
stamp?
Thanks a bunch!

"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?


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
Auto date for contracts Lisa Excel Discussion (Misc queries) 1 October 30th 06 02:33 PM
Auto Date with Manual Entry Protection JBallance Excel Worksheet Functions 1 September 23rd 06 02:47 AM
Mileage Claim Formula johndavies New Users to Excel 4 August 14th 06 09:24 AM
auto date script for 2 columns? have 1.. nastech Excel Discussion (Misc queries) 2 November 22nd 05 03:10 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


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

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"