First, the UDF in that thread is intended to be used in a formula in a worksheet. It is not useful to use within VBA code because all it does is refer to Range.MergeCells. You can do that just as easily in the code. That is:
But to tell you specifically what to do I would have to see the code you have. The only thing I can imagine that is giving you a problem is: Suppose you have A1 and B1 merged, and you see data in the merged cell. Data in a merged range is located in the upper-left cell of the range. If you write code to read B1, it will give you a blank because the data is in A1, not B1.
Bookmarks