auto enter date in cell on data entry in row

  • Thread starter Thread starter TommyJ
  • Start date Start date
T

TommyJ

I have a spreadsheet that I want the Date and a couple other value
(strings if it makes a difference) automatically filled in on when
user starts to enter data into a row.

ie.

user enters "foo" in A1 I want the current date to automatically ente
into A2, and an "N" in A3 and A4. this would be regardless of what'
in A1, only that there was data entered.

Thanks for any help offered in advance

Laziness is the Father of inventio
 
Tommy

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo enditall
Application.EnableEvents = False
If Target.Address = "$A$1" Then
If Target.Value <> "" Then
Excel.Range("A2").Value = Date
Excel.Range("A3").Value = "N"
Excel.Range("A4").Value = "N"
End If
End If
enditall:
Application.EnableEvents = True
End Sub

Gord Dibben Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top