tonyvee1973
IS-IT--Management
Sub Macro()
Dim nr As Integer, r As Long, i As Integer
nr = Cells(Rows.Count, 5).End(xlUp).Row
For r = nr To 5 Step -1
Select Case Cells(r, 5).Text
Case "36043": i = 24
Case "39013": i = 10
End Select
Rows(r + 1 & ":" & r + i).Insert shift:=xlDown
Next
End Sub
Hiya
Just applied the code above to add blank rows into my evergrowing sheet - when i try to run it i get "Run-time error '6': overflow.Any ideas on why this is and how i can fix?
Thanks
Dim nr As Integer, r As Long, i As Integer
nr = Cells(Rows.Count, 5).End(xlUp).Row
For r = nr To 5 Step -1
Select Case Cells(r, 5).Text
Case "36043": i = 24
Case "39013": i = 10
End Select
Rows(r + 1 & ":" & r + i).Insert shift:=xlDown
Next
End Sub
Hiya
Just applied the code above to add blank rows into my evergrowing sheet - when i try to run it i get "Run-time error '6': overflow.Any ideas on why this is and how i can fix?
Thanks