简体   繁体   中英

Take two columns and write them alternatively into one column

If I have data in two columns and now I want to make one column that writes the from row 1 column 1 into row 1 column 5 then row 1 column 2 into row 2 column 5. Please see the example below:

例

Off the top of my head, something like this:

=INDEX($AH$2:$AI$7,ROUNDUP(ROW(A1)/2,0),IF(MOD(ROW(),2)=0,1,2))

在此处输入图片说明

Edit: Or slightly shorter and not dependent on the starting row being an even row:

=INDEX($AH$2:$AI$7,ROUNDUP(ROW(A1)/2,0),MOD(ROW(A2),2)+1)

worker,

if you have Kutools Add_ins it's very simple. Please refer below link to know completely.

https://www.extendoffice.com/documents/excel/1171-convert-multiple-rows-to-single-row.html#a1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM