Get string/value from merged cell

Hello

 
Is there a built-in way to get the merged cells value simmilar to
 
Right now I check if the cell is merged with
 
and use
 
as the row to get the value.
 
V

Hi,

Merged cells are stored in the topleft cell of the range. That is, if you have a merged cell from A1 to C10, the value for the cell is the value in A1. 

So, you can just use 
bounds = GetCellMergedBounds();
GetStringFromCell(bounds.Top, bounds.Left)

Note that you can still store and read the values of the other cells in the merged range, but Excel won't show them, it will only show the topleft cell.

It all depends on what you need to read really, bue merged cells in Excel are just a layer over the real cells, which say "cells A1 to A10 are merged". The real cells below still exist but won't be shown.