ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   sorting names alphabetically when names may start with numbers (https://www.excelbanter.com/excel-discussion-misc-queries/10643-sorting-names-alphabetically-when-names-may-start-numbers.html)

John Smith

sorting names alphabetically when names may start with numbers
 
Anyway to sort names alphabetically when names may start with
numbers?

I have a list of name of chemicals. The names may start with
numbers, like 1,2-dichlorobutane. Right now, if I sort the list,
the names start with numbers would be on the top. How do I make it
ignore nubmers and sort alphabetically?

Bill Martin -- (Remove NOSPAM from address)


I have a list of name of chemicals. The names may start with
numbers, like 1,2-dichlorobutane. Right now, if I sort the list,
the names start with numbers would be on the top. How do I make it
ignore nubmers and sort alphabetically?

-----------

I'm not aware of any way to do that directly. If it were me, I'd create
a new column that has the numbers stripped off and then just sort on
that column. Your example shows a "-" between the numbers and letters.
If all your names are formatted like that then it's easy to strip off
the numbers from A1 by:

[A2] = right(a1,len(a1)-find("-",a1))

Otherwise, if you can't rely on that hyphen, then I'd personally have to
give up and write some kind of VBA routine to strip off the numbers.
Perhaps someone else here will have a more inspired suggestion.

Good luck...

Bill

GORDON SCALES via OfficeKB.com

Hi,

You need to insert a line at the top of your list and type in the header
names as you described. make sure there are no blank lines in your list.

Select any cell in your list (preferably the column you want to sort by)
then select Data, then sort. Make sure "my list has header row" is checked,
then you should have your header row names in the sort by drop down lists.

Good luck

--
Message posted via http://www.officekb.com

sorting names alphabetically

ALL I WISH IS TO sorting names alphabetically . CAN YOU HELP ME

"GORDON SCALES via OfficeKB.com" wrote:

Hi,

You need to insert a line at the top of your list and type in the header
names as you described. make sure there are no blank lines in your list.

Select any cell in your list (preferably the column you want to sort by)
then select Data, then sort. Make sure "my list has header row" is checked,
then you should have your header row names in the sort by drop down lists.

Good luck

--
Message posted via http://www.officekb.com



All times are GMT +1. The time now is 05:54 PM.

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