Reputation: 255
i have in Libreoffice Calc column A eg
1 5 25 7
and i want create column B with some copy method to
1 1 5 5 25 25 7 7
it has to be some simple solution, but i dont find it :(
thanks for answer
Answer just under this question is for Excel, but i need for LibreOffice Calc (my fault, i ask for excel earlier)
Upvotes: 0
Views: 217
Reputation: 255
I found solution alone, but Scott help me too much..thanks
=INDEX(A:A;ROUND(ROW(A1)/2);1)
Upvotes: 1
Reputation: 13790
To adapt Scott Craner's answer for LO Calc, the formula in B1 should be:
=INDEX(A:A,INT((ROW()-1)/2)+1)
Or this:
=INDIRECT(ADDRESS(INT((ROW()-1)/2)+1,1))
Documentation: INDEX, INDIRECT, ADDRESS, ROW.
Upvotes: 2
Reputation: 152505
In B1:
=INDEX(A:A,INT((ROW(1:1)-1)/2)+1)
And copy/drag down
Change the /2
to the number of time you want repeated.
Change the +1
to the row number where your data starts in that column.
Upvotes: 3