ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sort a Table into one long list (https://www.excelbanter.com/excel-discussion-misc-queries/212110-sort-table-into-one-long-list.html)

Stoke

Sort a Table into one long list
 
I have a table with row and column headings. Basically it's a grid of prices
for styles and materials. I'd like to sort those prices and have the row,
column headings displayed next to the list - sort of like this

cherry ash oak
plain 12.50 10 11.75
fancy 19.50 12 15

sorting into this

10 plain, ash
11.75 plain oak
12 fancy ash
12.50 plain cherry
15 fancy oak
19.50 fancy cherry

Is it possible? What's the right tool? Is Excel the right place? THanks




Don Guillett

Sort a Table into one long list
 
A looping macro that looked at each number and used the left column and the
top row to add to it.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Stoke" wrote in message
...
I have a table with row and column headings. Basically it's a grid of
prices
for styles and materials. I'd like to sort those prices and have the row,
column headings displayed next to the list - sort of like this

cherry ash oak
plain 12.50 10 11.75
fancy 19.50 12 15

sorting into this

10 plain, ash
11.75 plain oak
12 fancy ash
12.50 plain cherry
15 fancy oak
19.50 fancy cherry

Is it possible? What's the right tool? Is Excel the right place? THanks





Max

Sort a Table into one long list
 
One way to transform it with ease into the desired columnar listings

Assume your source table as posted is in Sheet1's A1:D3
where B1:D1 contains the 3 "wood" types: cherry, ash, oak
and in A2 down a plain, fancy, etc

In another sheet, place:
In A2: =OFFSET(Sheet1!$B$2,INT((ROWS($1:1)-1)/3),MOD(ROWS($1:1)-1,3))
In B2: =OFFSET(Sheet1!$A$2,INT((ROWS($1:1)-1)/3),)
In C2: =INDEX(Sheet1!$B$1:$D$1,MOD(ROWS($1:1)-1,3)+1)

Select A2:C2, copy down as far as required to exhaust the source data
Adapt the "3" and the INDEX ref range: Sheet1!$B$1:$D$1
within the expressions to suit the no. of source cols for "wood" types
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:365 Subscribers:65
xdemechanik
---
"Stoke" wrote:
I have a table with row and column headings. Basically it's a grid of prices
for styles and materials. I'd like to sort those prices and have the row,
column headings displayed next to the list - sort of like this

cherry ash oak
plain 12.50 10 11.75
fancy 19.50 12 15

sorting into this

10 plain, ash
11.75 plain oak
12 fancy ash
12.50 plain cherry
15 fancy oak
19.50 fancy cherry

Is it possible? What's the right tool? Is Excel the right place? THanks



Herbert Seidenberg

Sort a Table into one long list
 
Excel 2007
No macro, no formulas:
http://www.mediafire.com/file/mwyy2m...12_01_08a.xlsx

Stoke

Sort a Table into one long list
 
Thank you so much - it is really amazing to me to be taught something by
someone across the world - and in minutes after I ask the question!

Max

Sort a Table into one long list
 
Welcome, glad it got you going.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:365 Subscribers:65
xdemechanik
---
"Stoke" wrote in message
...
Thank you so much - it is really amazing to me to be taught something by
someone across the world - and in minutes after I ask the question!





All times are GMT +1. The time now is 09:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com