Thread: [Solved] merge cells
View Single Post
 
Old 02-28-2012, 04:32 AM
gsrikanth gsrikanth is offline Windows XP Office XP
Competent Performer
 
Join Date: Dec 2011
Posts: 133
gsrikanth is on a distinguished road
Default merge cells

Range("A1", Range("A" & ActiveSheet.HPageBreaks(1).Location.Row - 1)).Merge

merging come to only first page i need to all

- What is/are the type(s) of the page breaks; automatically inserted by Excel, manually inserted or both?

- You said you have 161 pages. In this case (from my experience) Excel will automatically insert 160 page breaks and don't set the last page break unless the last row in the last page is used.

My question is, do you want to merge the 1st column of last page despite how much of the page is filled with data? Please explain how do you want to do it. E.g., an option would be merging until the last used row. Another option would be merging certain number of rows, etc
1) page breaks are automatically inserted and manually
2) unless the last row in the last page is used
3) merge until the last used row
attachment for your reference
(manual prepaired)
Attached Files
File Type: xlsx Book131.xlsx (57.3 KB, 11 views)
Reply With Quote