View Single Post
  #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