Can I have default data in new rows?

K

Karl

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?
 
D

Don Guillett

Something like this ??

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

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

Top