Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
270
Counting Merged Cells
posted

How can i count Vertical merged cells. i.e cells merged in column 1 vertically, top to bottom.?

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi,

        I'm not sure what you mean. Do you want the count the number of cells merged into one cell? Or you want to count the total number of merged cell in the column?

        The former is fairly easy. The cell has a GetMergedCells method which will return an array containing all the cells that are merged into the mergecell with itself. 

        The latter would be more difficult and you would probably have to loop through each row and use GetMergedCells to determine how many rows to skip before looking at the next cell.  

         

Reply Children