ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   auto enter date in cell on data entry in row (https://www.excelbanter.com/excel-programming/285770-auto-enter-date-cell-data-entry-row.html)

TommyJ[_2_]

auto enter date in cell on data entry in row
 
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

--
Message posted from http://www.ExcelForum.com


Gord Dibben

auto enter date in cell on data entry in row
 
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

On Thu, 18 Dec 2003 09:40:17 -0600, TommyJ
wrote:

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

ie.

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

Thanks for any help offered in advance

Laziness is the Father of invention


---
Message posted from http://www.ExcelForum.com/




All times are GMT +1. The time now is 02:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com