Ubound multidimensional array

Shiro26

Board Regular
Joined
Oct 2, 2015
Messages
82
Hi there,

I have been looking for an answer to this question and didn t find the answer I was looking for.
Let s consider the 3D array with the following dimension:
Array(A,B,C)

I call a1 the first slice of my cube
I call a2 the second slice of my cube,
and so on

I call b1 the number of rows of my first slice
I call b2 the number of rows on my second slice
and so on

I call c1 the number of columns of my first slice
I call c2 the number of column on my seccond slice
and so on

The bi with i = 1 to B is varying from slice to slice.

Question:
I am interested in the second slice: Array(2, b2, c2)
Could somebody explain me what should be the VBA code to return me the number of rows of my second slice -in other word the b2.
Could somebody explain me what should be VBA code to return me the number of columns of my second slice -in other word the c2.

Thank you very much in advance for your explanation...

Kind Regards,

Shiro
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
All your slices are the same shape, so it's simply Ubound(array,2) and ubound(array,3) to get the upper boundaries of b and c.
 
Upvote 0

Forum statistics

Threads
1,214,823
Messages
6,121,777
Members
449,049
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top