I would like to count the number of rows in a named range that contains
multiple areas on the same worksheet. To setup the range, I held the Control
key down while selecting the three different areas and then selected
Insert>Name>Define to establish the data range. The following code yields
10 rows and not the expected 21. It appears the code only considers the first
part of the named range and not the entire string.
Any help would be appreciated.
Thanks
Sommer
Names in workbook:
data
Refers to:
=Sheet1!$A$3:$M$12,Sheet1!$A$25:$M$30,Sheet1!$A$40:$M$44
Macro code:
Set CheckArea = Range(data)
NumberOfRows = CheckArea.Rows.Count
Bookmarks