Multidimensional Array Tutorial / Reads

JPARKHURST

Board Regular
Joined
Oct 25, 2016
Messages
151
I'm having a hard time getting my head around something.

Ultimately, I am wanting to feed a range to an array, (for jobs), compare shift capacity to job requirements, and if the job qty is smaller than the shift capacity, add the job to the current shift, and move on to next job. When a job is larger than the remaining shift qty, then I want to split it, put whatever fits in this shift and then make another entry to put into the next shift - or, similarly - break another piece off for another shift if the job spans multiple shifts.

Having a bit of a time with the logic, but the crux of my problem right now is the arrays - I need to dim an array, set to range. Done, easy. Now I need to create another array, and feed array2(r,c) = array1(r,c) BUT, if the job 'splits', i will update to array2(r+1,c+1) = array1(r,c).

So therein lies my problem. I'm having a hard time finding some good reading material on how to redim an array to just add one row (seems extra columns are no issue, and THAT seems completely backwards.

So - am I missing something here? Does anybody have any resources i can take a look at? i'm just grabbing some 'extra' time in between tasks to try to get this and it's simply taking too much time, I'm wanting to cut it down.

Any direction is appreciated.

TIA,

Jon
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Why not simply define the second array at twice the size of the first , then each time you "add" a row keep a count, then you can redim preserve the array at the end to whatever size you end up with.
 
Upvote 0

Forum statistics

Threads
1,214,990
Messages
6,122,626
Members
449,093
Latest member
catterz66

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