ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sorting Multiple Columns (https://www.excelbanter.com/excel-discussion-misc-queries/161037-sorting-multiple-columns.html)

SGF1

Sorting Multiple Columns
 
I have a multi-column sheet with 326 rows that I am attempting to sort by:
State, City and Name. Currently the values for State are limited to "NJ".
If I sort by the above order there are eleven rows of data that are not
sorted correctly. They occur about 2/3ds of the way down the sheet.

I have already tried changing formats to text and number, copying and
pasting into another workbook as values. No fix. It does work normally if
you copy and paste into Word. But if you copy and paste back into Excel it
reverts back.

Any ideas on the cause and remedy would be greatly appreciated.


Pete_UK

Sorting Multiple Columns
 
You might have one or more spaces as well as "NJ" in those cells - you
can check by using a formula like:

=LEN(cell)

and if you get 3 or more it means you have more characters than just
"NJ". You can click on the right hand side of the formula bar (as if
to edit the cell) and see where the cursor ends up - is it right next
to the J, or separated by some space?

Obviously, if this is the cause then edit the contents of the cells to
get rid of the space(s).

Hope this helps.

Pete

On Oct 5, 5:06 pm, SGF1 wrote:
I have a multi-column sheet with 326 rows that I am attempting to sort by:
State, City and Name. Currently the values for State are limited to "NJ".
If I sort by the above order there are eleven rows of data that are not
sorted correctly. They occur about 2/3ds of the way down the sheet.

I have already tried changing formats to text and number, copying and
pasting into another workbook as values. No fix. It does work normally if
you copy and paste into Word. But if you copy and paste back into Excel it
reverts back.

Any ideas on the cause and remedy would be greatly appreciated.




SGF1

Sorting Multiple Columns
 
Thank You! tried the =LEN() and the rogue lines had three characters instead
of two. Again, thanks!

"Pete_UK" wrote:

You might have one or more spaces as well as "NJ" in those cells - you
can check by using a formula like:

=LEN(cell)

and if you get 3 or more it means you have more characters than just
"NJ". You can click on the right hand side of the formula bar (as if
to edit the cell) and see where the cursor ends up - is it right next
to the J, or separated by some space?

Obviously, if this is the cause then edit the contents of the cells to
get rid of the space(s).

Hope this helps.

Pete

On Oct 5, 5:06 pm, SGF1 wrote:
I have a multi-column sheet with 326 rows that I am attempting to sort by:
State, City and Name. Currently the values for State are limited to "NJ".
If I sort by the above order there are eleven rows of data that are not
sorted correctly. They occur about 2/3ds of the way down the sheet.

I have already tried changing formats to text and number, copying and
pasting into another workbook as values. No fix. It does work normally if
you copy and paste into Word. But if you copy and paste back into Excel it
reverts back.

Any ideas on the cause and remedy would be greatly appreciated.





Pete_UK

Sorting Multiple Columns
 
You're welcome - glad you were able to track down the rogue data.

Pete

On Oct 6, 5:05 pm, SGF1 wrote:
Thank You! tried the =LEN() and the rogue lines had three characters instead
of two. Again, thanks!



"Pete_UK" wrote:
You might have one or more spaces as well as "NJ" in those cells - you
can check by using a formula like:


=LEN(cell)


and if you get 3 or more it means you have more characters than just
"NJ". You can click on the right hand side of the formula bar (as if
to edit the cell) and see where the cursor ends up - is it right next
to the J, or separated by some space?


Obviously, if this is the cause then edit the contents of the cells to
get rid of the space(s).


Hope this helps.


Pete


On Oct 5, 5:06 pm, SGF1 wrote:
I have a multi-column sheet with 326 rows that I am attempting to sort by:
State, City and Name. Currently the values for State are limited to "NJ".
If I sort by the above order there are eleven rows of data that are not
sorted correctly. They occur about 2/3ds of the way down the sheet.


I have already tried changing formats to text and number, copying and
pasting into another workbook as values. No fix. It does work normally if
you copy and paste into Word. But if you copy and paste back into Excel it
reverts back.


Any ideas on the cause and remedy would be greatly appreciated.- Hide quoted text -


- Show quoted text -





All times are GMT +1. The time now is 05:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com