Forum Discussion

ppaccounting's avatar
ppaccounting
Copper Contributor
Jan 30, 2022

Changing row/column orientation (?)

Ok, I'm not sure how to word this...

 

I have a huge list of items that all have several ROWS each. Each row of information for the products varies only by quantities and price. 

 

Example...this is ONE item (I have hundreds)

 

ItemQuantityBase Net Price (Each)
130011250.92000
130012500.52500
130015000.29450
1300110000.17500
1300115000.13500
1300125000.09900
1300150000.06240

 

This is the result I want:

 

ItemQty 1Qty 2Qty 3 Qty 4Qty 5Qty 6Qty 7Base Net 1Base Net 2Base Net 3Base Net 4Base Net 5Base Net 6Base Net 7
1300112525050010001500250050000.920.5250.29450.1750.1350.0990.0624

 

How do I do this quickly (without just cutting/pasting for hundreds of products?)

2 Replies

  • ppaccounting 

    =IFERROR(INDEX($B$3:$B$21,SMALL(IF($A$3:$A$21=$E3,ROW($1:$19)),COLUMN(A1))),"")

     

    =IFERROR(INDEX($C$3:$C$21,SMALL(IF($A$3:$A$21=$E3,ROW($1:$19)),COLUMN(A1))),"")

     

    These formulas could be an alternative solution. Enter formulas as matrixformulas with ctrl+shift+enter if you don't work with Office365 or 2021. The unique list of items can be created with data -> remove duplicates.

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    ppaccounting The attached file contains two possible solutions. One with old-fashioned indexing formula. The other with modern dynamic array functions UNIQUE, FILTER and TRANSPOSE. The yellow coloured cell are the ones that contain formlae.

     

    Both can be improved by using a structured table for the data or named ranges. But in this example I kept the direct cell references so that you can figure out how it all works.

     

    Edit: Since you mentioned to work with hundreds of products, consider using Power Query. Added another file with an example.

Resources