Good Afternoon,

First of all I want to clarify that these days I make my first steps in VBA...

I have an excel file with ~2500 rows.
Some times in the month, I have to input data in this sheet, after certain headers.
Also, I have to put blank lines for the headers that I do not have data.

For example, in the picture below, you can see the entries of OCT 19

sample.png

What I want to do, is create a macro which will insert every time a new line

sample2.png

before line with headers (header 2a, header 2b etc)

I tried to create a macro, but with no success....


Sub INSERT_ROWS()
Dim i As Long, y As Long
For i = Range("c" & Rows.Count).End(3).Row To 2 Step -1
If Cells(i, "c").Offset(y) = "HEADER 1" Then
Rows(i).Insert
End If
Next i
End Sub


Could, someone help me pls?..