Cross-table into flat list

Arnodekkers1995

New Member
Joined
Feb 19, 2016
Messages
11
Dear all,


I'm trying to turn a "cross-table" into a flat list, but even after i lot of searching and reading i haven't yet achieved what i want.


First i'll give some context:


Let say table A is a cross-table, with columns which describe a cabinets' width, and with rows describing the cabinets' type. (In this example low, medium and high cabinets)


Now, in this table each customer fills in the desired number he wants to buy.


These data should be converted to a flat list, so further in the excel sheet, a list can be made (let's say as a quotation) in which the different combinations can be given a price (automatically)


Now, i will upload a picture of the file i'm using as example.


I hope you can help me turning the pivot table into a list (Dynamically)


Preferably without VBA (should be dummyproof when finished), but if really necesarry, it ain't a problem.




Thanks in advance,


Arno

2wqbk1t.png
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
300400500600col Jcol N
low2
med3300400500600row 3
high14low125126127128
med131132133134
high137138139140
numberwidthprice
2low300250
3med500399this is what is NEEDED
1high500139
4high600560first price derived from=B12*OFFSET($J$3,MATCH(C12,$J$4:$J$6,0),MATCH(D12,$K$3:$N$3,0))
col Acol Bcol C
2low300
3med500< < < < < < < < <this is produced by this macroeasy to add the price formula in col D
1high500
4high600
tot = 19
For j = 2 To 4
For k = 2 To 5
If Cells(j, k) = "" Then GoTo 100
tot = tot + 1
Cells(tot, 1) = Cells(j, k)
Cells(tot, 2) = Cells(j, 1)
Cells(tot, 3) = Cells(1, k)
100 Next k
Next j
End Sub

<colgroup><col width="64" span="18" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0
col J to col N is a price table

top left table is starting point

mid left table merely defines what we want

bottom left table is produced by the macro
 
Upvote 0
Hello,

I'm sorry, i don't really get i yet.. Is it possible to send me the file you used? I think that will clear it up for me..

Thanks in advance!

Arno
 
Upvote 0
Sorry I don't download - what is it you do not understand - is it what the macro is doing ?
 
Upvote 0
Allright, fixed this, even without using vba!
But now, i've found a second problem... I'd like to separate the number a customer gives, like shown below.
(For further processing purposes.. Imagine buying 5 cabinets, but 2 in red, 2 in blue.. With this, it's possible to insert a colomn to define the color of each cabinet separately)

Offcourse, going from 'left bottom table' to 'right bottom table' also ain't a problem, if that's going to be the cure, i'll just hide the tab with the current table on it, no problem.

x0sivd.jpg


Thanks in advance!

Arno
 
Last edited:
Upvote 0
size
type300400500600
a32
b14
c123
1a400
this macro produces the itemised table1a400
1a400
tot = 141a500
For j = 6 To 81a500
For k = 3 To 61b300
If Cells(j, k) > 0 Then GoTo 1001b600
GoTo 501b600
100 For n = 1 To Cells(j, k)1b600
tot = tot + 11b600
Cells(tot, 10) = 11c400
Cells(tot, 11) = Cells(j, 2)1c500
Cells(tot, 12) = Cells(5, k)1c500
Next n1c600
50 Next k1c600
Next j1c600
End Sub

<colgroup><col width="64" span="14" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,454
Messages
6,124,931
Members
449,195
Latest member
Stevenciu

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