Based on nothing more than your sample file the below would be a very rough example...
Sub Example()
Dim lngRow As Long, lngCount As Long
For lngRow = 2 To 1000 Step 1
lngCount = lngCount + 1
Cells(lngRow, "A").Value = lngCount
If Cells(lngRow, "A").MergeCells Then lngRow = lngRow + (Cells(lngRow,"A").MergeArea.Rows.Count - 1)
Next lngRow
End Sub
obviously you will need to revise your range (start/end row based on range content in another column perhaps ?)
One point I would make re: pasting formulae into merged areas etc is that even if the results appears only in top left cell of area the formula still exists in all cells that are not visible... to illustrate using your file... if you were to enter:
A2: =1+MAX(A$1:A1)
and copy / paste special / formula over A3:A12 you would find that the "hidden" cells are still populated and return results as they would were they not merged.
Bookmarks