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
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