Duplicating row, without stepping on row below

K

kevs

This may be hard to explain but here it goes:

I have ten rows of info.
Now on row 5, I want to duplicate 5 to row 6.

Now if there was only 5 rows this would be easy. I would select that row,
and then in bottom right corner, I would drag. I would see that plus sign,
that now turns into the handle sign. I would drag and now row 6 would be a
duplicate of row 5.

But what do I do if there is already important info in row 6, and I would
just like to do this, but have row 6 bump down one row?

thanks
OS 10.3.4
Office 2004
 
J

JE McGimpsey

kevs said:
This may be hard to explain but here it goes:

I have ten rows of info.
Now on row 5, I want to duplicate 5 to row 6.

Now if there was only 5 rows this would be easy. I would select that row,
and then in bottom right corner, I would drag. I would see that plus sign,
that now turns into the handle sign. I would drag and now row 6 would be a
duplicate of row 5.

But what do I do if there is already important info in row 6, and I would
just like to do this, but have row 6 bump down one row?

Manually:

Copy row 5. Select row 6. Type Ctrl-I (or choose Insert/Copied Cells)

Programatically:

To copy everything, try something like:

Public Sub InsertRow()
With Selection.EntireRow
.Copy
.Insert Shift:=xlShiftDown
End With
Application.CutCopyMode = False
End Sub


If you want to copy just formulas, take a look at David McRitchie's
InsrtRow() macro:

http://www.mvps.org/dmcritchie/excel/insrtrow.htm
 

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