Merge Cells with excel 2003

  • Thread starter Thread starter jfcby
  • Start date Start date
J

jfcby

Hello,

I have a worksheet that I would like to merge 2 cells each row (200
rows and several worksheets) begining with A6:B6.

Below is a code I've tried to modify but I still can't get it to work
right. Can this code be changed to merge 2 cells begining with A6:B6
through 200 rows?

Sub TryNow2()
Dim i As Integer
For i = 0 To 2
Cells(6, i * 1 + 1).Resize(1, 2).Merge
Next i
End Sub

Thanks for your help in advance,
jfcby
 
Your code as written will walk through the columns not the rows. Your
counter should be in the first part of the parenth, i.e.
For i = 0 To 194
Cells(i*1+6,1)
 

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