Thread: Sorting
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Sheeloo[_2_] Sheeloo[_2_] is offline
external usenet poster
 
Posts: 364
Default Sorting

One way is as follows;
In B1 enter
=A1
In B2 enter
=IF(LEFT(A2,1)=" ",B1,A2) and copy down

Sort the data set on B then A...

"amezera" wrote:

I have a list I need to sort. Column A has rows with indented text that
needs to stay with above non-indented rows. How do I sort the whole column
to keep indented text with non-indented text row above? In the below
example, my end result should be Cindy with her group of Pat & Amy should
come before Jack, but Pat and Amy remain indented. Is there a way to do this
by keeping Amy & Pat indented in the same column A?

Example:

A
1 Jack
2 Cindy
3 Pat
4 Amy