LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Define name, count rows problem.

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
InsertNameDefine 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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
pivot table - Can I pre-define rows and columns? WRBailey Excel Discussion (Misc queries) 3 May 17th 05 06:11 PM
problem with Rows.Count and comparing cells PZipko Excel Programming 3 July 9th 04 07:33 PM
Problem with UsedRange.Rows.Count alainB[_15_] Excel Programming 4 April 29th 04 10:29 PM
problem using Set statement to define range object mel Excel Programming 0 February 4th 04 06:10 PM
Define Range in Deleting Empty Rows HamishM[_3_] Excel Programming 1 December 19th 03 01:17 AM


All times are GMT +1. The time now is 05:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"