Excel Insert Row after 4 Rows
Closed
Cthomp
-
Jul 6, 2010 at 12:10 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jul 6, 2010 at 06:45 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jul 6, 2010 at 06:45 PM
Related:
- Excel Insert Row after 4 Rows
- 4 elements trainer - Download - Adult games
- Diablo 4 free download - Download - Role playing
- Gta 4 download - Download - Action and adventure
- Saints row 2 cheats - Guide
- Pluraleyes 4 download - Download - Video editing
1 response
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jul 6, 2010 at 06:45 PM
Jul 6, 2010 at 06:45 PM
That will not do for you. In that the objective was to move row into columns. You want to add a row after every fourth row
Sub AddBlankRow() Dim Cell As Range Dim sTgtSht As String Dim lMaxRows As Long Dim lRow As Long sTgtSht = "Sheet1" Set Cell = Sheets(sTgtSht).Cells.Find("*", Cells(1, 1), SearchOrder:=xlByRows, SearchDirection:=xlPrevious) If Cell Is Nothing Then GoTo End_Sub lMaxRows = Cell.Row Set Cell = Nothing For lRow = 5 To lMaxRows Step 5 Sheets(sTgtSht).Rows(lRow).Insert lMaxRows = lMaxRows + 1 Next lRow End_Sub: End Sub