I am trying to work out quite a complicated lookup and think I will need to use VBA but am stuck
I am trying to populate store numbers in a location grid:
Stores === No. of locations needed
50582 === 1
90789 === 1
90890 === 3
33333 === 1
44444 === 1
55555 === 2
The grid is numbered sequentially, with even numbers on one side and odd on the other:
Sequence ----- Location Number --------- Sequence ------- Location Number
1 ---------------- 11 -------------------- 2 ------------------ 12
3 ---------------- 13 -------------------- 4 ------------------ 14
What I need to do is taking the allocate the number of locations needed into the grid using the sequence, (i.e. 1,2,3,4,) but where more than one location is needed, these need to be alloccated only on one side of the grid (i.e. locations kept together), but then continuing on, backfilling the other side:
For example
Sequence -- Location Number -- Allocate --------- Sequence -- Location Number -- Allocate
1 ----------------11 ---------- 50582 ----------- 2 ------------ 12----------- 90789
3 ----------------13 ---------- 90890 ----------- 4 ------------ 14----------- 33333
5 ----------------15 ---------- 90890 ----------- 6 ------------ 16----------- 44444
7 ----------------17 ---------- 90890 ----------- 8 ------------ 18
Any help is appreciated
I am trying to populate store numbers in a location grid:
Stores === No. of locations needed
50582 === 1
90789 === 1
90890 === 3
33333 === 1
44444 === 1
55555 === 2
The grid is numbered sequentially, with even numbers on one side and odd on the other:
Sequence ----- Location Number --------- Sequence ------- Location Number
1 ---------------- 11 -------------------- 2 ------------------ 12
3 ---------------- 13 -------------------- 4 ------------------ 14
What I need to do is taking the allocate the number of locations needed into the grid using the sequence, (i.e. 1,2,3,4,) but where more than one location is needed, these need to be alloccated only on one side of the grid (i.e. locations kept together), but then continuing on, backfilling the other side:
For example
Sequence -- Location Number -- Allocate --------- Sequence -- Location Number -- Allocate
1 ----------------11 ---------- 50582 ----------- 2 ------------ 12----------- 90789
3 ----------------13 ---------- 90890 ----------- 4 ------------ 14----------- 33333
5 ----------------15 ---------- 90890 ----------- 6 ------------ 16----------- 44444
7 ----------------17 ---------- 90890 ----------- 8 ------------ 18
Any help is appreciated
Last edited: