ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to refer to a merged range value (https://www.excelbanter.com/excel-programming/390727-how-refer-merged-range-value.html)

clara

how to refer to a merged range value
 
Hi all,

How to refer to a merged area value, only do I know is using the first
merged cell address.

Clara


--
thank you so much for your help

vbapro

how to refer to a merged range value
 
If you know the first cell address of a merged area, simply use its value
And if you do not know the address of the first cell, you can obtain the
value of the merged area in this way Range(A!).MergeArea(1).Value. Instead
of A1 you should use the address of any cell which is a part of the merged
area.


"clara" wrote:

Hi all,

How to refer to a merged area value, only do I know is using the first
merged cell address.

Clara


--
thank you so much for your help


Chip Pearson

how to refer to a merged range value
 
Clara,

Use the MergeArea property. E.g.,

Debug.Print Range("C10").MergeArea.Address


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting LLC
www.cpearson.com
(email on the web site)


"clara" wrote in message
...
Hi all,

How to refer to a merged area value, only do I know is using the first
merged cell address.

Clara


--
thank you so much for your help





All times are GMT +1. The time now is 03:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com