Transposing Several Rows Into Multiple Columns

12learnexcel

New Member
Joined
Aug 3, 2009
Messages
7
Hi everyone. I've been searching for a thread about this query but all I found refer to Multiple Rows to Single Columns and the like.
I need help in transposing Several Rows into Multiple Columns and I would appreciate if it's in a formula format and not VBA.
The table looks like this:

ProductDetailSale
12345
Product 1Date of SaleA1A2A3A4A5
Client NameB1B2B3B4B5
QuantityC1C2C3C4C5
Price / PcD1D2D3D4D5
Product 2Date of SaleA6A7A8A9A10
Client NameB6B7B8B9B10
QuantityC6C7C8C9C10
Price / PcD6D7D8D9D10
Product 3Date of SaleA11A12A13A14A15
Client NameB11B12B13B14B15
QuantityC11C12C13C14C15
Price / PcD11D12D13D14D15

<tbody>
</tbody>

Please note that the Sale number extends up to 20 and the Products are up to 200.

I need it to look like this on another worksheet:

Consolidated Sales List
ProductDate of SaleClient NameQuantityPrice / Pc
Product 1A1B1C1D1
Product 1A2B2C2D2
Product 1A3B3C3D3
Product 1A4B4C4D4
Product 1A5B5C5D5
Product 2A6B6C6D6
Product 2A7B7C7D7
Product 2A8B8C8D8
Product 2A9B9C9D9
Product 2A10B10C10D10
Product 3A11B11C11D11
Product 3A12B12C12D12
Product 3A13B13C13D13
Product 3A14B14C14D14
Product 3A15B15C15D15

<tbody>
</tbody>


I've been trying to research about this and work it out myself but my deadline is fast approaching. Thanks everyone in advance for your help.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Step 1 in same sheet. Copy formula down and across as far as you need to

Sheet1

*ABCDEFGH
1Product*******
2**12345*
3Product 1Date of SaleA1A2A3A4A5A6
4*Client NameB1B2B3B4B5*
5*QuantityC1C2C3C4C5*
6*Price / PcD1D2D3D4D5*
7Product 2Date of SaleA6A7A8A9A10*
8*Client NameB6B7B8B9B10*
9*QuantityC6C7C8C9C10*
10*Price / PcD6D7D8D9D10*
11Product 3Date of SaleA11A12A13A14A15*
12*Client NameB11B12B13B14B15*
13*QuantityC11C12C13C14C15*
14*Price / PcD11D12D13D14D15*

<tbody>
</tbody>

Spreadsheet Formulas
CellFormula
H3=OFFSET($C3,4*INT((COLUMN()-3)/5),MOD(COLUMN()-3,5))

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Last edited:
Upvote 0
Step 2 in new sheet. Copy Formula Down, Copy second formula down and across as far as you need to. You will have to tweak these formulas to adjust for number of products, etc.

Sheet2

*ABCDE
1ProductDate of SaleClient NameQuantityPrice / PC
2Product 1A1***

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:63px;"><col style="width:78px;"><col style="width:78px;"><col style="width:56px;"><col style="width:67px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
A2="Product "&INT((ROW()+3)/5)
B2=OFFSET(Sheet1!$C$3,COLUMN()-2,ROW()-2)

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Upvote 0
hi smkyle,

the formulas are awesome. thank you.

in sheet 1, everything looks great. i have no problem with the formula. thank you.

but in sheet 2, it was also ok except that i need all the 20 sales records of all the 200 products to be consolidated into all 5 columns only (Product, Date of Sale, Client Name, Quantity and Price/Pc) such that under these 5 headers there will be 20 rows of Product1's followed by 20 rows of Product2's and so on up to 20 rows of Product200's. what the formula did was,it consolidated the 20 sales records of each product into 20 different list sets (which i believe was my mistake since i mentioned that i needed it to be transposed, i apologize, i actually needed them to be consolidated). i tried tweaking the formula myself but it seemed i need more training.

anyway, help please. and thank you so much in advance.
 
Last edited:
Upvote 0
could you use Excel Jeanie to show me what you have? I think you may want to either use a pivot table or to do something like this:

Excel Workbook
ABCDE
1Product 11Product 115
2Product 12Product 210
3Product 13
4Product 14
5Product 15
6Product 21
7Product 22
8Product 23
9Product 24
Sheet1


Personally I would go with a pivot table because they are flexible and easy to change to suit your style preferences. Totally up to you though
 
Upvote 0
hi smkyle,

thank you very much for your help. i rearranged my table to achieve the results that i wanted and the formula you suggested is working fine now.

thanks again.
 
Upvote 0

Forum statistics

Threads
1,214,584
Messages
6,120,387
Members
448,956
Latest member
JPav

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