Merge the same group of cells down a column quickly

  • Thread starter Thread starter Rich F
  • Start date Start date
R

Rich F

I've got 900 rows of data in which each needs to have cells 1:3 merged and
centered (so, a1:a3, b1:b3, c1:c3, etc). Is there any fast way of doing this
besides selecting the same three cells in each row, hitting Merge & Center,
and then moving on to the next row? Trying to create a macro has been
fruitless and quite frustrating.

Im using 2007.

Thanks in advance!
 
in the name box put a1:c900. then "Merge Across", then r-click selection
and format cells, alignment Horizontal Center.
 
What/Where is "Merge Across"? Otto

Bob I said:
in the name box put a1:c900. then "Merge Across", then r-click selection
and format cells, alignment Horizontal Center.
 
Here is a macro that will do that. HTH Otto
Sub Macro1()
Dim rColA As Range
Dim i As Range
Set rColA = Range("A2", Range("A" & Rows.Count).End(xlUp))
For Each i In rColA
i.Resize(, 3).HorizontalAlignment = xlCenter
i.Resize(, 3).Merge
Next i
End Sub
 
Otto,

O.k, I now see what I was doing wrong. This works perfectly, too!

Thanks for teh speedy response.
 
Home tab, Alignment panel, and just below "Merge and center" on the
pulldown. Rich is using 2007.
 
Thanks Bob. I hadn't seen that. Otto

Bob I said:
Home tab, Alignment panel, and just below "Merge and center" on the
pulldown. Rich is using 2007.
 

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