View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
davedownunder davedownunder is offline
external usenet poster
 
Posts: 3
Default Generating different numbers of rows depending on data

I have a row of data in cells a1:d1 Each cell has a value of either 0,1,2 or 3
lets assume the row contains 1,3,0,2 (these are calculated elsewhere and are
not unique - it is a "random" lists of 0's, 1's etc

I have created rows of data that have generated data in them. Lets say the
row is 1,2,5,9,8,4 (again this data is generated elsewhere) - this is an
intermediate row in say row 99 so a99=1, b99=2, c99=5, d99=9 and so on

I want to create a number of rows starting in row 5 that are created
according to the data in row 1, such that in my example the 99 row is created
1 times at row 5, then offset to the right by1 cell and created 3 times in
rows 6,7,8, then offset by 1 and created 0 times, then offset by 1 and
created 2 times in rows 9,10.

So the sheet starting in row 5 would look like (~ is a blank cell)

1,2,5,9,8,4~~~
~1,2,5,9,8,4~~
~1,2,5,9,8,4~~
~1,2,5,9,8,4~~
~~~1,2,5,9,8,4
~~~1,2,5,9,8,4

I have complete freedom over what goes on, so for example if i needed to
create a column that was simply row 1 rotated i could do that.

Thanks in advance for your help.

Dave