SOLVED

# excel vba arrays filling one dim array with 2dim array

Occasional Contributor

# excel vba arrays filling one dim array with 2dim array

I have 6300 rows and I want to search in this data with multiple criteria Is it possible arrays help me in this work . if i Filling a 2-dimensional array with a one-dimensional array or make multiple dim array

8 Replies

# Re: excel vba arrays filling one dim array with 2dim array

Please try to explain as clearly as you can what you want.

# Re: excel vba arrays filling one dim array with 2dim array

Excuse me, can you explain to me this sentence in this link?
https://stackoverflow.com/questions/39821883/vba-3-dimensional-array

(" The practical way storing the data is to have a 1D array filled with 2D arrays. This will allow you to use standard techniques to work with thee data.")

best response confirmed by adnan2004 (Occasional Contributor)
Solution

# Re: excel vba arrays filling one dim array with 2dim array

While VBA can easily handle three-dimensional (and higher) arrays, Excel cannot store them directly: a worksheet is a two-dimensiona array of rows and columns.

The reply on Stack Overflow proposes to create a one-dimensional array - think something like {item1, item2, item3, ...} in which each item is a two-dimensional array. So item1 would be an array of rows and columns, item2 would be another array of rows and columns, etc.

Each of these items can be stored on a worksheet.

But I don't see how this relates to the question in the first post.

# Re: excel vba arrays filling one dim array with 2dim array

Thank you for the answer, you are a great person,Yes, I understood the meaning and now the idea that ran through my head when I read this article is it possible to use 3D and higher arrays if i want to search with more than one condition and take advantage of the speed of arrays and this is the reason behind this post How do I actually use that if my idea is correct

# Re: excel vba arrays filling one dim array with 2dim array

I'm afraid I don't understand what you want to do. Could you try to explain that clearly and in detail?

# Re: excel vba arrays filling one dim array with 2dim array

Thank you for your reply. I am really appreciate it,I want to get the most out of studying arrays, I learned from studying arrays and loops how to search for something in an array and I want to apply this if I'm searching for more than one condition in big data. I want to know is it possible to use 3D and higher arrays if I want to search with more than one condition to gain more benefit from the speed of arrays.

Anyone else?