Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Getting excel array dimension

Dear Friends,

when having a excel sheet with values from a1 to c5, is it possible to
get the dimensions of the 2-dim array without counting?

Thanks,
Georgios


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Getting excel array dimension

All Excel ranges have a rows and columns property; these are effecively your dimensions

e.

?range("c4:f19").rows.coun
16
?range("c4:f19").columns.coun
4
You have to take care when indexing i.e. allow for option base.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Getting excel array dimension

~× wrote:
*All Excel ranges have a rows and columns property; these ar
effecively your dimensions.

e.g

?range("c4:f19").rows.count
16
?range("c4:f19").columns.count
4
You have to take care when indexing i.e. allow for option base. *


Yes that is clear. The question though arised from the fact that when
pivot table is to be created with the wizard, Excel magically enoug
automatically selects the range that appears on the sheet when only on
cell of the range is selected.
That means that it can found the U & L bounds of the range.

In my application the input range may vary in terms of dimensions and
want to avoid manually to select, give or calculate the dimensions o
my range.

Thanks,
Georgio

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Getting excel array dimension

One way:

?Range("C4").CurrentRegion.Rows.Count

?Range("C4").CurrentRegion.Columns.Count

In article ,
banavas wrote:

Yes that is clear. The question though arised from the fact that when a
pivot table is to be created with the wizard, Excel magically enough
automatically selects the range that appears on the sheet when only one
cell of the range is selected.
That means that it can found the U & L bounds of the range.

In my application the input range may vary in terms of dimensions and I
want to avoid manually to select, give or calculate the dimensions of
my range.

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
excel file dimension tassato Excel Discussion (Misc queries) 1 June 19th 08 10:40 PM
can i adjust the dimension of cells in mm in Excel? Anarkasis Excel Discussion (Misc queries) 1 February 20th 05 09:46 PM
how to prepare 3 dimension graph in excel Som Chatterjee Charts and Charting in Excel 2 December 8th 04 06:16 PM
Applying Sum Function to 2nd Dimension of Array ExcelMonkey[_36_] Excel Programming 2 January 28th 04 05:48 PM
single dimension array RobcPettit Excel Programming 3 January 20th 04 08:33 AM


All times are GMT +1. The time now is 04:35 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"