简体   繁体   中英

How to transpose data from multiple rows to columns in excel

I hope someone can help with this.

I need to convert data that is currently held in rows to a column. So there could be Part number 1 that has 5 different pieces of data currently held in 1 row. Example in the first image

Current Setup

I need part number 1 to be in column A 5 times with the different pieces of data in column B. Example in the second image.

New setup

I am able to do it the other way using the formula below but I can't get it to work in reverse.

=INDEX(Sheet1!$E:$E,SMALL(INDEX(($A3=Sheet1!$A:$A)*(MATCH(ROW(Sheet1!$A:$A), ROW(Sheet1!$A:$A)))+($A3<>Sheet1!$A:$A)*1048577,0,0),COLUMN(A3)))

Thank you

For anyone that comes across this post I found the following formulas work.

To deal with your reference number and transpose use. =OFFSET($A$2,FLOOR((ROW(A2)-ROW($A$2))/6,1),0)

To deal with your data and transpose use. =OFFSET($B$2,FLOOR((ROW(B2)-ROW($B$2))/6,1),MOD(ROW(A2)-ROW($A$2),6))

Hope this helps

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