Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
-random-
 
Posts: n/a
Default Sorting by Group of Cells

I doubt this can be done, but it sure would be handy.

Column is grouped by conceptual blocks, (note, there is not second column of
unique data) eg:

Cheese
Cheddar
Blue
Swiss
Bread
Italian
Bran
French

I want to sort by alpha so that I get (evenutally):

Bread
Bran
French ...
Cheese
Blue
Cheddar ...

Aside from setting up the table in two columns (Bread/Cheese; Types) and
making sure Bread/Cheese is in each column-cell that correspondes to the
types and THEN sorting - is there another way to do this? Grouping?
Protection?

thx
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default Sorting by Group of Cells

It sure seems like the easiest approach would be to put the data in separate
columns.

Depending on how the data was entered, you could extract the values with a
couple of formulas:

If you actually indented those type entries with extra spaces, you could do
something like this:

(Assumes the data is in A1:Axx)

Put this in B1:
=a1
put this in B2:
=IF(LEFT(A2,1)=" ",B1,A2)
select b2 and drag down to Bxx.

Put this in C1:
=""
Put this in C2:
=IF(LEFT(A2,1)=" ",TRIM(A2),"")
Select c2 and drag down to Cxx.

Then select columns B:C
edit|copy
edit|paste special|values

Select columns A:C
sort the selection with a primary key of column B and a secondary key of column
C.

Delete columns B:C when you're done.
=======
If you didn't use extra spaces to indent those types, then how do you know
what's a category and what's a type?




-random- wrote:

I doubt this can be done, but it sure would be handy.

Column is grouped by conceptual blocks, (note, there is not second column of
unique data) eg:

Cheese
Cheddar
Blue
Swiss
Bread
Italian
Bran
French

I want to sort by alpha so that I get (evenutally):

Bread
Bran
French ...
Cheese
Blue
Cheddar ...

Aside from setting up the table in two columns (Bread/Cheese; Types) and
making sure Bread/Cheese is in each column-cell that correspondes to the
types and THEN sorting - is there another way to do this? Grouping?
Protection?

thx


--

Dave Peterson
  #3   Report Post  
Dave O
 
Posts: n/a
Default Sorting by Group of Cells

Nothing comes to mind, short of doing the dirty work of assigning a
category and subcategory to each entry. If I may editorialize for a
moment, to my thinking that exercise would come in handy in the future
for summarizing or totalling or what have you. You could hide the
category and subcategory columns if they don't fit into your aesthetics.

  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Breitenbach
 
Posts: n/a
Default Sorting by Group of Cells

I have a solution for this using the CODE function but it is a multistep
process and it takes up a number of columns of formulas to get your sort.
It wont fit very well in this reply window, but I could email you the
spreadsheet if you post an email address.

The CODE function converts letters to a number(I believe its ASCII codes).
In any case once you convert the letters to numbers you can sort them easier
- but its still not simple - at least my method was not. I'm happy to send
my solution.

Dave

"-random-" wrote:

I doubt this can be done, but it sure would be handy.

Column is grouped by conceptual blocks, (note, there is not second column of
unique data) eg:

Cheese
Cheddar
Blue
Swiss
Bread
Italian
Bran
French

I want to sort by alpha so that I get (evenutally):

Bread
Bran
French ...
Cheese
Blue
Cheddar ...

Aside from setting up the table in two columns (Bread/Cheese; Types) and
making sure Bread/Cheese is in each column-cell that correspondes to the
types and THEN sorting - is there another way to do this? Grouping?
Protection?

thx

Reply
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
Display contents of a specific cell even if a group of cells is mo Larry Heine Excel Worksheet Functions 5 December 4th 08 10:33 PM
Sorting Cells by Colors swiftcode Excel Discussion (Misc queries) 2 September 26th 05 10:53 AM
Sorting Area with Merged Cells prizm1 New Users to Excel 3 September 10th 05 11:49 PM
excel group sorting meehaha Excel Discussion (Misc queries) 1 July 5th 05 06:07 PM
Trying to group cells so that I can sort the upper most cell with. magnetoworld New Users to Excel 8 March 14th 05 07:17 PM


All times are GMT +1. The time now is 12:04 AM.

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

About Us

"It's about Microsoft Excel"