Fill Default/Fill Copy

G

GregR

I have a macro that copies the last entered row and inserts rows based
on a number from an input box. It works great except two of the
columsns I want the copied formulas to increment to the next value and
two of the columns not to increment. Right now all of the columns in
the copied rows increment. The inserted rows start at row 8 and are
incremented by the number in the input box. TIA

Greg
 
T

Tom Ogilvy

set rng = Cells(rows.count,1).end(xlup)(2)
rng.Value = rng.Offset(-1,0).Value + Textbox1.Text
rng.offset(0,1).Value = rng.offset(-1,1).Value

the first gets incremented, the second does not.

This may be what you mean or it might not.
 

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