1 reply
by carollong
I saw this done by a VB programmer some years ago - I don't have sample code but I can suggest a method [with examples]. I hope this helps.
Select the data area of the table as a range [B2:J5]
use your programming skills to derive the right mostcolumn [r1=J] and down most row [r2=5]
use your programming skills to derive the left most column [r3=B] and up most row [r4=2]
Select the column where the product labels [l1=A]
select the row with the date labels [l2=1]
select the point at which the list starts [s=A100]
use your programming skills to manage this variable as list start row [s1=100] and list start column [s2=A]
have a variable for current list cell [x=A100]
use your programming skills to manage this variable as current list row [x1=100] and current list column [x2=A]
have a variable for current data cell [c=B2] (derive this from the range selected0
use your programming skills to manage thisvariable as current data row [c1=2] and current data column [c2=B]
have a variable for current product label derived from l2 and c2 [d1=B1]
have a variable for current date label derived from l1 and c1 [d2=A2]
goto current list cell [x=A100]
Then repeat this:
copy contents of d1 to this cell
increase column count on list [x1=B]
goto current list cell [x=B100]
copy contents of d2 to this cell
increase column count on list [x1=c]
goto current list cell [x=C100]
copy contents of c to this cell
increase x2 [x=101] and set x1 to s2 [x1=A]
goto current list cell [x=A101]
increase c1 unless it is bigger than r1 then (set c1 to r3 and increase c2)
If c2 is bigger than r2 then (goto cell s and stop) else (recalculate values for d1 d2 and repeat)
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending