Pavel Severýn
Pavel Severýn

Reputation: 255

Libre Office Calc copy and doubles values to other column

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

Answers (3)

Pavel Severýn
Pavel Severýn

Reputation: 255

I found solution alone, but Scott help me too much..thanks

=INDEX(A:A;ROUND(ROW(A1)/2);1)

Upvotes: 1

Jim K
Jim K

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))

spreadsheet result

Documentation: INDEX, INDIRECT, ADDRESS, ROW.

Upvotes: 2

Scott Craner
Scott Craner

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.

enter image description here

Upvotes: 3

Related Questions