Prev: Date incrimintation
Next: Date increments
From: Fumei2 via OfficeKB.com on 5 Mar 2010 13:15 Oh, and it is even worse having vertical merged cells. Horizontal is bad, but vertical is worse. It them messes up BOTH RowIndex and ColumnIndex. Fumei2 wrote: >"Is there a way to find out what rows have been merged? " > >Not easily. You can try checking against the ColumnIndex for the last cell, >in each row. > >So if the last cell of Row1 has a ColumnIndex = 3, and the last cell of Row3 >has a ColumnIndex = 2, then you know Row3 has a merged cell. > >HOWEVER, you do NOT know which one, nor can you. > >I avoid merged cells; they screw up VBA badly. If you need things to look >like they are merged, play around with the format of the cells (borders etc.) >rather than merge. > >>VBA can not actioned against merged cells. Period. It simply will not. >> >[quoted text clipped - 20 lines] >>>> > Thanks, >>>> > Stuart -- Message posted via http://www.officekb.com
From: Doug Robbins - Word MVP on 5 Mar 2010 16:13
You should be able to use Selection.Rows(1).Range -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "Fumei2 via OfficeKB.com" <u53619(a)uwe> wrote in message news:a490a02d9a1a3(a)uwe... > Oh, and it is even worse having vertical merged cells. Horizontal is bad, > but vertical is worse. It them messes up BOTH RowIndex and ColumnIndex. > > Fumei2 wrote: >>"Is there a way to find out what rows have been merged? " >> >>Not easily. You can try checking against the ColumnIndex for the last >>cell, >>in each row. >> >>So if the last cell of Row1 has a ColumnIndex = 3, and the last cell of >>Row3 >>has a ColumnIndex = 2, then you know Row3 has a merged cell. >> >>HOWEVER, you do NOT know which one, nor can you. >> >>I avoid merged cells; they screw up VBA badly. If you need things to look >>like they are merged, play around with the format of the cells (borders >>etc.) >>rather than merge. >> >>>VBA can not actioned against merged cells. Period. It simply will not. >>> >>[quoted text clipped - 20 lines] >>>>> > Thanks, >>>>> > Stuart > > -- > Message posted via http://www.officekb.com > |