Programatically merge every other row?

  • Thread starter Thread starter David Bateman
  • Start date Start date
D

David Bateman

Sub TryNow()
Dim i As Integer
For i = 0 To 84
Cells(10, i * 3 + 1).Resize(1, 3).Merge
Next i
End Sub

Sorry it appears that I have to merge every other row. Can this be done?
 
David,

Sub TryNow()
Dim myRow As Long
Dim i As Integer
For myRow = 10 to 1000 Step 2
For i = 0 To 84
Cells(myRow, i * 3 + 1).Resize(1, 3).Merge
Next i
Next myRow
End Sub

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top