Copy each row from sheet1 into two rows in sheet 2

256 Views Asked by At

I have a CSV sheet, a product feed. I want to copy every row from that feed into a new sheet but with two rows there for each in the original. Applied to this data in sheet1:

Product 1,data,more_data
Product 2,data,more_data
Product 3,data,more_data  

I use these formulae:

sheet2 row 2 = ='sheet1'!A2
sheet2 row 3 = ='sheet1'!A2

and then pull them down, with this result (ie it skips every even row):

Product 1,data,more_data
Product 1,data,more_data
Product 3,data,more_data
Product 3,data,more_data
Product 5,data,more_data

But what I would like in sheet2 is:

Product 1,data,more_data
Product 1,data,more_data
Product 2,data,more_data
Product 2,data,more_data
Product 3,data,more_data
Product 3,data,more_data

Is there a formula to fix this?

2

There are 2 best solutions below

4
On BEST ANSWER

Please try:

=INDIRECT("sheet1!A"&(MOD(ROW(),2)+ROW())/2)
0
On

=INDIRECT("sheet1!A"&(MOD(ROW();2)+ROW())/2)

This worked for me! But what if I want 3 rows instead of 2?