LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Herbert Seidenberg
 
Posts: n/a
Default sorting data by a certain attribute

Here is a solution with formulas, R1C1 Ref Style and Advanced Filter.
Select the attributes and do
Data Text to Column
Delimited
Check space, comma
Treat consecutive limiters as one
With headers and other addittions, your data might then look like this:
Cust
..
Banks MI RI OF
Davis Cn
Jones RI
Smith MI RI Cn
Thomas Cn MI
Walsh MI

Select the range that includes the header <Cust,
a cell with a period (or a space) and 6 data cells and
Insert Name Create Top Row
Select the 6 x 3 array of attributes and
Insert Name Define Names in Workbook: array1
Also define these names:
rown Refers To: =ROW(INDEX(C1,1):INDEX(C1,ROWS(array1)))
coln Refers To: =COLUMN(INDEX(R1,1):INDEX(R1,COLUMNS(array1)))
natts Refers To: =ROW(INDEX(C1,1):INDEX(C1,COUNTA(array1)))
roco Refers To: =LARGE((10*rown+coln)*NOT(ISBLANK(array1)),natts)

To extract the unique attributes in array1, use this setup

Alist alist 1 2 3 4 mcnts
MI MI Walsh Thomas Smith Banks
MI Cn Thomas Smith Davis .
Cn RI Smith Jones Banks .
Cn OF Banks . . .
RI
MI
RI
Cn
OF
RI
MI

<Alist consists of 11 entries ( 11=COUNTA(array1))
Select all 11 cells and enter this array formula with Cntrl+Shift+Enter
=INDEX(array1,LEFT(roco),RIGHT(roco))
Create a second <alist of unique values with
Advanced Filter and name it <alist.
Create the horizontal series from 1 to 4
(4=MAX(COUNTIF(array1,array1)))
and name it <mcnts.
At the intersection of alist=MI and mcnts=1, enter this array formula
=INDEX(Cust,LARGE((array1=alist R)*rown,mcnts C)+1)
Copy this cell to the rest of the array.
Do not select the whole array or more than one cell when hitting
Cntrl+Shift+Enter.
If your list of <Cust is in the double digits,
then the 10 in <roco has to be increased to 1000 and
LEFT/RIGHT(roco) changed to LEFT/RIGHT(roco,2)
The array can be be rotated to appear as in your post with
Copy Paste Special Values, Transpose
Reversion to A1 Reference Style can be done now.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ranking query JaimeTimbrell Excel Discussion (Misc queries) 2 February 16th 06 08:09 AM
sorting data and automatic graphs timc Charts and Charting in Excel 3 January 27th 06 08:37 PM
Inserting a new line when external data changes Rental Man Excel Discussion (Misc queries) 0 January 11th 06 07:05 PM
Automatically sorting data leehutch Excel Discussion (Misc queries) 4 August 22nd 05 06:36 AM
how do you prevent data from changing values when sorting linked . Cassie Excel Discussion (Misc queries) 0 March 4th 05 10:45 AM


All times are GMT +1. The time now is 06:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"