multidimensional arrays

  1. F

    Storing data in 2D array

    I'm using a 2D dynamic array, for data in rows and columns. The number of rows increases/decreases. The array data doesn't seem to be stored. For code line "MsgBox my_arr(2, 2)", a blank appears. Not sure if this is the reason: With multidimensional dynamic arrays, only the last dimension can...
  2. O

    How to redim multidimensional correctly

    Hello My code here (posting only error area) gives me subscription out of range error For i = LBound(l) To UBound(l) If l(i, 6) = "Completed" Then n = n + 1 ReDim Preserve a(1 To n) As Variant a(n) = l(i, 1) End If Next i ReDim Preserve a(1 To UBound(a), 1 To...
  3. X

    How to Access Array Made With Arrays?

    Hello, I am a novice to VBA, but I'm getting there. I am trying to build a program, and one of its aspect is to use two-dimensional arrays. One of the functions get directories, where it fetches an array of folder directories, an array of spreadsheet directories, and then stores both of those...
  4. O

    cannot add value to array

    Hello, I have this code involving adding 3 bits of data to 3 multi dimensional arrays - running some processes and then printing back from one array Problem I am having is writing the calculated result back to the array Please have a look and tell me where I am wrong.. I am not posting the...
  5. O

    VBA debug compile error

    Hello, I am working on this code that matches multiple criteria and then does a bunch of copy pasting (simply put) I am looping through my array, sending through the criteria to the UDF, which loops through the second data region to find the match and paste the values I want pasted simple...
  6. R

    VBA - How do we use Collection (or) Array to Generate report in excel sheet while it has activate,

    We've to generate each individual report like Table 02 based on Branch in next sheet, using Table 01 Sheet (Sales) Table Data through VBA While Sheet(Report) Activate, Table 01 Date Branch Invoice No Delivery Date Riders Name Amount Remark 28/06/2020 A 2532 28/06/2020 James $ 125.90...
  7. JONABRA

    What type of array am I working with when I place specific columns into an array and try pasting them to a new sheet

    Greetings I'm fairly new to VBA and finally require some assistance, as I can't seem to find this question on any of the forums I have a sheet with multiple columns, but only need a select few. I recently came across a method to paste an entire column in an array with a line of code that...
  8. B

    Store some TXT values into an Array - New Type of Question

    Dears, Lets suppose I have the following database: P|GEKU1A|15|KOSVO|0|7 S|BUVBA|-25594833|-49101500|CPN|CF|0|15400|18870|23460|500|260|0|0|0|0|0|0|0 S|GEKUD|-25523178|-49023769| |TF|0|0|0|0|0|260|0|0|0|0|0|0|0 S|GEKUD|-25523178|-49023769| |IF|0|0|0|0|0|260|0|0|0|0|0|0|0...
  9. O

    How to create multidimensional arrays when the size of each is a variable?

    Hi, apologies if this has been answered before, I could not find anything after a long search. I am running through hundreds of data sets, which I am transforming into new data based on a various numbers of dividends and divisors (D&D for short here). During each process, I count the number...
  10. J

    Comparing multi-dimensional arrays in VBA to single column - double loop

    I want to compare values in a Multid array to a values in a single Column. Stoploss: 45 54 76 OHLC: 37 43 30 40 32 43 41 43 32 54 76 87 I want to compare each value in Stoploss to OHLC and find the first value that is larger than Stoploss in OHLC, in this case the first number larger than...
  11. S

    Ubound multidimensional array

    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...
  12. M

    Add Entire Row to Existing Multi-Dimensional Array

    I have a single array of row numbers. I need to create another array, this one multidimensional, to hold all 12 columns of data from just those rows in the first array. The needed rows are not contiguous. I want to avoid the time consuming loops if possible. I'd like to add each entire...
  13. K

    Chart with multiple data in columns and raws

    <tbody> Sales rep Region Week 1, no of files Week 1, sales value Week 2, no of files Week 2, sales value Week 3, no of files Week3, sales value Amy North 5 20000 10 50000 15 10000 Amy South 10 30000 15 12000 10 12000 John North 15 8000 10 18000 15 8000 John South 5 17000 15 7000 5 15000...
  14. L

    Declare correctly a two dimensional dynamic array

    Hi there, I'm stuck with a search / copy macro in Excel. What I am trying to do is to modify a piece of code I used before. I was searching a range in sheet A (wsOut) for an item X and copy the entire line to sheet B (wsIn) if X was found within the range. I did this through an input box. As...
  15. T

    Arrays and Looping to fill them

    Hey Guys, I was wondering if you might be able to help me. I have been all over the web pulling my hair out on this one. It seems I can't find an informative answer on this. They all just seem to list code that does the job, but doesn't explain how it works. Goal: Grab data from sheet 1...
  16. L

    Building and Comparing a Multidimensional Array in a for loop

    Hi everyone, I'm trying to build to 2 mulitimensional arrays to compare against each other. When it finds matchs it will output the contents of the array. The fields I want to put in the first array are "Shedule_P" and "Shedule_D" they both have the same number of rows. The second array should...
  17. U

    How can I create a multidimensional array of integers

    I need to create a multidimensional array for columns for each month. I use arrays all the time but it has been a long time since I used a multidimensional array. The array needs to contain 1) The month's number, 1 through 12. 2) The number of columns for the month, this will be a 4 or 5 for...
  18. J

    Multidimensional Array Help

    Arrays always do my head in. Find a simple piece of code of what I'm trying to do. As I would normally throw variables into an array using: aTest = array(1,2,3,4,5) Is it possible to do this for multiple dimensional ones? Dim sTest(4, 4) As String Dim ii As Integer, jj As Integer...

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