Hi
I have created a macro (see below) to include empty rows based on a cell value in the 3rd column. This macro works fine as long as I begin my data in the cells A1.
However, when my range starts in a different column then A, the macro does not work. I tried to make adjustments in the "Cells" function (for example by entering a cellreference there but it doesn't work). Can anyone help me what I should enter in the Cells function if I want it to change to other columns? (what I tried is changing the "1" in the first Cells formula but it didn't work). Thanks in advance
Sub Test()
For N = Cells(Rows.Count, 1).End(xlUp).Row To 1 Step -1
If Cells(N, 3) <> "" And Cells(N, 3) <> 1 Then
Rows(N + 1 & ":" & N + Cells(N, 3) - 1).Insert
End If
Next N
End Sub
Bookmarks