View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default Can I have default data in new rows?

Something like this ??

Sub insertrowwithdefaults()
ar = ActiveCell.Row
Rows(ar).Insert
Cells(ar, 1) = 12
Cells(ar, 2).Formula = "=a" & ar & "*2"
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Karl" wrote in message
...
I have a sheet that the first 5 rows have "administrative" data and some
sums
of the data below, basically it's a "header" section, the entire worksheet
below that, the first 15 columns hold all the data for the worksheet.
What I
want to do is whenever someone inserts a new row or starts on a blank row
at
the bottom, to autofill some of the data within the columns, some of them
are
formulas and some are simple like "Yes/No" drop down lists. Can you do a
"onNewRow" event type macro to copy formulas or is there simply a default
data fill option in excel?