Location of Cell with Value in Merge Area
bstobart,
Range(any cell in merged area).MergeArea.Cells(1).Value
So, for your example:
Range("C3").MergeArea.Cells(1).Value
--
HTH,
Bernie
MS Excel MVP
"bstobart" wrote in message
...
If I have a range object consisting of only a single mergedarea in VBA and
want to determine which cell is the one holding the value, how can I do that?
Two examples:
Merged Range is A1:D7 Value is in A1
Merged Range is A1:D7 Value is i n D7
[I believe that the value of a merged range can only be in the upper right
cell or the lower left cell. The above examples are for illustration only.]
In a general sense, how can I determine the location of the cell with the
value? Note: I won't know in advance whether the cell with the value is
populated or blank.
|