Thread: Auto Date
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
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?