Hello, I'm VBA rookie and i need help from you, VBA Wizards I have this code:
And when i started macro i get a overflow error. I googled and i found advices only about not using Integer variables, but i'm using Long and my data set has only about 1000 rows. Can anybody help me, please? Thank you very much!
Code:
Sub roztrideni()
Dim PosledniPlnyRadek as Long
Dim i As Long
'Rows("1:22").EntireRow.Delete
PosledniPlnyRadek = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To PosledniPlnyRadekIf Cells(i, 1) = "Air Bank a.s. / Evropská 2690/17 / 160 00 Praha 6 / IC 29045371 / BIC AIRACZPP" Then
Rows(i).EntireRow.Delete
Rows(i - 2).EntireRow.Clear
Rows(i - 3).EntireRow.Clear
Rows(i + 1).EntireRow.Clear
Rows(i + 2).EntireRow.Clear
Rows(i + 3).EntireRow.Clear
Rows(i + 4).EntireRow.Clear
Rows(i + 5).EntireRow.Clear
Rows(i + 6).EntireRow.Clear
Rows(i + 7).EntireRow.Clear
i = i - 10
End If
Next i
End Sub