How do I detect if a cell in excel is merged?
If the cell is merged how do I read the value?
Here's how to read the cell's value in VBA, regardless if it is merged or not.
C.MergeArea.Cells(1, 1).Value
where C
is the cell you want to look at. The way this works is that the MergeArea is either exactly the same as the cell itself if the cell is not merged; otherwise the MergeArea is the range of cells that have been merged. And when the cells are merged, the value is kept in the topleftmost cell.