Insert Rows Below

E

ExcelUser73

Hello,
I'm trying to insert rows below a row. I first run a filter so tha
some rows are showing then I want to insert new rows after each row tha
is showing. I need to manually insert a variable number of rows afte
each row that is showing.
I used to be able to use the "Insert Row Below" option in the olde
version of Excel, but this version seems like it doesn't have it?
Thanks in advance for your hel
 
G

Gord Dibben

I have never seen that command in any version of Excel I ever used.

Which "older version" are you speaking of?

Insert Copied Cells is closest thing I can think of.


Gord
 
S

Spencer101

ExcelUser73;1602377 said:
Hello,
I'm trying to insert rows below a row. I first run a filter so tha
some rows are showing then I want to insert new rows after each row tha
is showing. I need to manually insert a variable number of rows afte
each row that is showing.
I used to be able to use the "Insert Row Below" option in the olde
version of Excel, but this version seems like it doesn't have it?
Thanks in advance for your help

Hi,

I don't remember there being an "Insert Row Below" option in Excel... I
Word yes, but Excel??? Hmmm....

Anyway, I'm sure you could do what you need, but you'd need VBA to d
it.
Might be worth posing the question again with the view of someon
helping you out with code to do this.

Sorry I cannot be of more help than that.

S
 
D

Don Guillett

Hello,
I'm trying to insert rows below a row. I first run a filter so that
some rows are showing then I want to insert new rows after each row that
is showing. I need to manually insert a variable number of rows after
each row that is showing.
I used to be able to use the "Insert Row Below" option in the older
version of Excel, but this version seems like it doesn't have it?
Thanks in advance for your help

???

for each c in activesheet.usedrange.specialcells(xlvisible)
c.entirerow.insert
next c
 
G

GS

It happens that ExcelUser73 formulated :
Hello,
I'm trying to insert rows below a row. I first run a filter so that
some rows are showing then I want to insert new rows after each row that
is showing. I need to manually insert a variable number of rows after
each row that is showing.
I used to be able to use the "Insert Row Below" option in the older
version of Excel, but this version seems like it doesn't have it?
Thanks in advance for your help

Like everyone else states, I've never seen such an option in Excel. It
certainly would be nice if there was one, though!

<FWIW>
I include a utility in all my addins that gives users the option (from
the right-click menu) to insert rows above or below the active row, OR
left or right of the active column. A prompt to enter the number of
rows/cols (default=1) appears and the deed is done! Perhaps you could
include something similar.

(The popup menu also has an option to insert more rows/cols to extend
the end of a pre-defined table. Same prompt for how many to insert.)

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
 
B

Bob Flanagan

The following code will do what you want:

Sub InsertRowsBelow()
Dim anyR As Range
Set anyR = Selection.SpecialCells(xlVisible)
Selection.SpecialCells(xlVisible).Offset(1, 0).EntireRow.Insert
anyR.Offset(1, 0).Select
End Sub

If you don't need to select the new rows, then all you need is

Selection.SpecialCells(xlVisible).Offset(1, 0).EntireRow.Insert

You can place the above in yoru personal.xlsx workbook and when you
need to run, just press ALT-F8 and select it.

Robert Flanagan
Add-ins.com LLC
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel
 

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