View Single Post
  #1   Report Post  
Eric
 
Posts: n/a
Default retrieve text from merged cells

I have several cells in a single column merged into one cell.
Before merging the top cell had text and the other cells in the "to be"
merged area had no text. Then i merged them. ok so far.
Now i have a macro that iterates down the rows. some rows are ordinary rows
and in some places they are part of a merged area (in a single column)

My question is: How do i read the text in the merged cell?

str = Cells.Item(mRow, mCol).Value sometimes produces str==""
when it hits a row that contains part of a merged cell

str = Cells.Item(mRow, mCol).MergedCells.Text is the kind of thing i need.
How do you do that?

Thanks
Eric