Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Determining the size of a range.

Is there a means for discovering the size of a particular range? (Like, how
many rows or columns are in the range.) (Using VBA, of course.)

--
from
Dave the wave~~~~~


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Determining the size of a range.


iRows=Selection.Rows.Count
iColumns = Selection.Columns.Count

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Dave the wave" wrote in message
...
Is there a means for discovering the size of a particular range? (Like,

how
many rows or columns are in the range.) (Using VBA, of course.)

--
from
Dave the wave~~~~~




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Determining the size of a range.

Thanks!
--
from
Dave the wave~~~~~

"Bob Phillips" wrote in message
...

iRows=Selection.Rows.Count
iColumns = Selection.Columns.Count

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Dave the wave" wrote in message
...
Is there a means for discovering the size of a particular range? (Like,

how
many rows or columns are in the range.) (Using VBA, of course.)

--
from
Dave the wave~~~~~






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default Determining the size of a range.

Dave,

Try this

Dim rngTest as range
set rngTest = selection
debug.print rngTest.Count 'number of cells
debug.print rngTest.Columns.Count 'number of columns
debug.print rngTest.Rows.Count 'number of rows

Robin Hammond
www.enhanceddatasystems.com

"Dave the wave" wrote in message
...
Is there a means for discovering the size of a particular range? (Like,

how
many rows or columns are in the range.) (Using VBA, of course.)

--
from
Dave the wave~~~~~




Reply
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
Determining Frequency of range Leitodd Excel Worksheet Functions 2 October 16th 09 03:03 AM
Excel VBA - determining range donfon13 Excel Programming 3 June 23rd 04 09:46 PM
Determining last copied range R Avery Excel Programming 2 February 13th 04 12:11 AM
Determining range Sam Carleton Excel Programming 3 October 31st 03 11:55 PM
Determining end of user-selected range Syed Faisal Excel Programming 2 October 23rd 03 05:22 PM


All times are GMT +1. The time now is 07:12 AM.

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

About Us

"It's about Microsoft Excel"