Thread: Sorting
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
John C[_2_] John C[_2_] is offline
external usenet poster
 
Posts: 1,358
Default Sorting

A leading space is where when the data is entered, it is entered as
<spacebar<spacebarPat

Whereas indentation is utilized by clicking on the Format menu, Cells
selection, Alignment tab, and then checking if the Indent box is 0. If it is
not indented, then it was most likely entered with leading space(s).

As far as the solution Sheeloo gave, it will work with leading spaces.
click on cell B1
Insert-- Column
Follow Sheeloo's instructions
After sorting, highlight column B and delete column B

--
John C


"amezera" wrote:

I'm not sure what a leading space is....

Also, as for the first responder, I have other data in columns B,C,D.... so
I can't put a formula. (Not sure if I am allowed to alter the spreadsheet to
insert a column to fascilitate a sorting formula...as I am not the author of
it.)

"John C" wrote:

The OP said the other names were indented, no matter how far indented, the
left character isn't a blank space. Now, if the OP meant there were leading
spaces.....then it would work.
--
John C


"Sheeloo" wrote:

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