Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Initialize data in new row?

Like a timestamp

right click on the worksheet and insert code like this:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Count 1 Then Exit Sub
If Target.Row < 1 And Target.Column < 1 Then
If IsEmpty(Cells(Target.Row, 1)) Then
On Error GoTo ErrHandler
Application.EnableEvents = True
Cells(Target.Row, 1).Value = Date
Cells(Target.Row, 1).NumberFormat = "mm/dd/yyyy"
End If
End If
ErrHandler:
Application.EnableEvents = True
End Sub


--
Regards,
Tom Ogilvy

Ken wrote in message
om...
Hi. When data is entered into a new row, I want to initialize a value
into one of the row's cells. How would I do that?

Thanks!

Ken



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
How do you initialize the values in a circular reference? turbosteve Excel Discussion (Misc queries) 4 July 16th 10 06:06 AM
Need to re-initialize cell with original formula Cinco Charts and Charting in Excel 2 July 17th 09 08:05 PM
Data Entry Online, Data Format, Data Conversion and Data EntryServices through Data Entry Outsourcing [email protected] Excel Discussion (Misc queries) 0 March 20th 08 12:45 PM
Does Word have to initialize the root folders everytime? RAFLOW Excel Discussion (Misc queries) 2 August 31st 07 08:16 PM
Userform Initialize & combo box values michaelberrier Excel Discussion (Misc queries) 3 June 27th 06 04:35 PM


All times are GMT +1. The time now is 12:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"