Data transformation and Transpose in Excel

sfdc1

New Member
Joined
Jun 3, 2015
Messages
3
Hi There, I am just starting with advanced excel now and have following problem -

Primary set of data
OptionsProductQuantityPrice
Option 1Product 1110
Option 1Product 2110
Option 1Product 3110
Option 1Product 4110
Option 1Product 5110
Option 2Product 1220
Option 2Product 2220
Option 2Product 4220
Option 2Product 5120
Option 3Product 1330
Option 3Product 2330
Option 3Product 3330
Option 3Product 4330

<tbody>
</tbody>

I want to convert this data to -

QuantityTotal Price
Option 1Option 2Option 3Option 1Option 2Option 3
Product 1123102030
Product 2123102030
Product 31NA310NA30
Product 4123102030
Product 511NA1020NA

<tbody>
</tbody>


and then final transformation to -

Option 1Option 2Option 3
Product 11(10)2(20)3(30)
Product 21(10)2(20)3(30)
Product 31(10)NA3(30)
Product 41(10)2(20)3(30)
Product 51(10)1(20)NA

<tbody>
</tbody>


OR to
Option 1Option 2Option 3
Product 110 (1)20 (2)30 (3)
Product 210 (1)20 (2)30 (3)
Product 310 (1)NA30 (3)
Product 410 (1)20 (2)30 (3)
Product 510 (1)20 (1)NA

<tbody>
</tbody>

in Excel sheet. Thanks
 
Last edited:

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Hi sfdc1,
The easiest way is by Pivot table. Put "Product" field to row labels of pivot table, "Quantity" and "Price" to Values (Data field), and "Options" to column labels. This table you can also get with formulas with SUMPRODUCT function.
Create row and column labels for your result table (Product1,..., Product5, and Option 1,.., Option 3).
If your data start at cell A1, and your result table begins at A20 then put this formula in cell B21 and fill across all other cells in result table:
=SUMPRODUCT(--($A21=$B$2:$B$14),--(B$20=$A$2:$A$14),$C$2:$C$14) &" (" &
SUMPRODUCT(--($A21=$B$2:$B$14),--(B$20=$A$2:$A$14),$D$2:$D$14)&")"
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,843
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top