ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Add rows to top of list instead of bottom (https://www.excelbanter.com/excel-worksheet-functions/166248-add-rows-top-list-instead-bottom.html)

harwookf

Add rows to top of list instead of bottom
 
Is there a default way to add rows to the top of the list instead of the
bottom, also without the shading of cell height from the header row.

Many thanks in advance.

Mike H.

Add rows to top of list instead of bottom
 
I assume you mean with a macro. If you want to insert more rows, modify the
code. Just do this:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 11/16/2007
'

'
Rows("2:2").Select
Selection.Insert Shift:=xlDown
Rows("3:3").Select
Selection.Copy
Rows("2:2").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End Sub



"harwookf" wrote:

Is there a default way to add rows to the top of the list instead of the
bottom, also without the shading of cell height from the header row.

Many thanks in advance.



All times are GMT +1. The time now is 09:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com