Oooh. If you looked at help, you would have seen that .merge has a parameter
that tells it to merge it one row at a time:
Application.DisplayAlerts = False
ActiveSheet.Range("A:B").Merge across:=True
Application.DisplayAlerts = True
I cheated though.
I've added a button to my favorite toolbar that merges row by row.
tools|customize|commands tab|format category
Look for the "Merge Across" icon.
(Then I just recorded a macro when I did it manually.)
Dean_Bradko wrote:
I am using Excel to produce report from a VB front end. The report can
contain hundreds of sections and each section has two columns that are merged
together. I take a huge perfomance hit by having to merge the cells for each
row of data individually, so I would like to be able to select the entire two
columns and merge them together at once. However, doing this also merges all
the rows together so I get one HUGE cell that spans the entire length of the
report.
ActiveSheet.Columns(A:B).Merge ' this merges everything
Does anyone have any idea how to merge columns without merging the rows too?
--
Dave Peterson