Insert New Row Below, Not Above

jazzpony

New Member
Joined
Dec 11, 2015
Messages
2
I have written the following code to insert a new row so that an entry isn't overwritten:

Range("B2").EntireRow.Insert

The new row is inserted ABOVE the previous post. I would like to have the new row inserted BELOW the previous post.

Thank you!
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
I have written the following code to insert a new row so that an entry isn't overwritten:

Range("B2").EntireRow.Insert

The new row is inserted ABOVE the previous post. I would like to have the new row inserted BELOW the previous post.

Thank you!
Hi jazzpony, welcome to the boards.

Um, why not just insert the row at B3 instead?
 
Upvote 0
Or
Rich (BB code):
Range("B2").Offset(1,0).EntireRow.Insert
 
Upvote 0
I tried that and it overwrites the previous line and doesn't advance.
Odd, on my tests with sample data that looked like this:


Excel 2010
A
1TEST1
2TEST2
3TEST3
Sheet1


After running this macro:

Code:
Sub TEST()
Range("B3").EntireRow.Insert
End Sub

It looks like this:


Excel 2010
A
1TEST1
2TEST2
3
4TEST3
Sheet1
 
Upvote 0
Hi, I had written a code earlier to insert "n" rows between at a given position. Does this work for you? :

Code:
Sub insertrows()
Dim a As Integer, Rw As Range
Set Rw = Application.InputBox("Please select the row to shift: ", Type:=8)
Rows(Rw.Row & ":" & Rw.Row).Resize(1).Insert
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,248
Messages
6,171,021
Members
452,374
Latest member
keccles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top