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: 153
Default count cells in range

Hello,

I’ve thought about this one for a while, but haven’t been able to
reason out why. Haven’t found anything in the groups that quite
addresses this. Hopefully someone can straighten me out.

Set r = Range("A1:C3")
r.Count returns number of cells (9)

Set r2 = Intersect(r, Rows(1))
r2.Count returns number of cells (3)

but

Set r2 = r.Rows(1)
Now, r2.Count returns number of rows (1)

I now have to specify cells to get the cell count
r2.Cells.Count returns number of cells (3)

Thanks for your help,

regards,

Dave
 
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
Count how many different cells are in a range John T Kennedy[_2_] Excel Discussion (Misc queries) 1 June 25th 09 06:22 PM
Count a range of cells using an IF Access Joe Excel Worksheet Functions 9 July 31st 08 12:26 AM
Count Empty Cells in Range After Cells with Data David Excel Programming 16 September 17th 06 03:03 PM
Count Cells in Range Steve C Excel Programming 3 February 28th 06 02:15 PM
Count cells in one range based on parameters in another range dave roth Excel Worksheet Functions 2 March 29th 05 05:33 PM


All times are GMT +1. The time now is 08:11 AM.

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"