oshkoshbagoshh icon

alternaterows

oshkoshbagoshh | PRO | 08/18/17 05:04:46 AM UTC | 0 ⭐ | 471 👁️ | Never ⏰ | []
VisualBasic |

620 B

|

None

|

0 👍

/

0 👎

'*******************************************************************************
' This code will insert a row after every row in the selection
'       --Note: can modify for every column instead of row
'                           ~ AJ Javadi ~
'*******************************************************************************
 
Option Explicit
 
Sub InsrtAlternateRows()
 
Dim rng As Range
 
Dim CountRow As Integer
 
Dim i As Integer
 
Set rng = Selection
 
CountRow = rng.EntireRow.Count
 
For i = 1 To CountRow
 
    ActiveCell.EntireRow.Insert
    
    ActiveCell.Offset(2, 0).Select
    
Next i
 
    
End Sub

Comments