Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel: Merge two columns into one column with alternating values

how can I merge two columns of data into one like the following:

Col1    Col2    Col3
========================
A       1       A
B       2       1
C       3       B
                2
                C
                3
like image 573
Julian Avatar asked Dec 04 '25 08:12

Julian


1 Answers

You can use the following formula in column D as per my example. Keep in mind to increase the $A$1:$B$6 range according to your data.

=INDEX($A$1:$B$6,INT((ROWS(D$2:D2)-1)/2)+1,MOD(ROWS(D$2:D2)-1,2)+1)

Result:

enter image description here

like image 91
Koby Douek Avatar answered Dec 06 '25 23:12

Koby Douek



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!