Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / December 2005

Tip: Looking for answers? Try searching our database.

Sort text list alphabetically using a formula

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
paddyyates - 19 Dec 2005 15:12 GMT
Does anyone know of a formula you can use to sort a list of text
alphabetically?

I know the data/sort option but I want something that can pick up new
entries in the original data list without the use having to intervene.

Seems like a straightforward enough idea but I can't find anything.

Signature

paddyyates

Domenic - 19 Dec 2005 16:52 GMT
First, set up a dynamic range for your list of text and give it a name,
such as MyRange.  Then enter the following formula in a cell, let's say
B1, and copy down:

=IF(ROWS($B$1:B1)<=COUNTA(MyRange),INDEX(MyRange,MATCH(SMALL(COUNTIF(MyRa
nge,"<"&MyRange),ROWS($B$1:B1)),COUNTIF(MyRange,"<"&MyRange),0)),"")

...confirmed with CONTROL+SHIFT+ENTER, not just ENTER.  Post back if you
need help creating a dynamic range.

Hope this helps!

In article <paddyyates.20am2y_1135005304.861@excelforum-nospam.com>,
paddyyates <paddyyates.20am2y_1135005304.861@excelforum-nospam.com>
wrote:

> Does anyone know of a formula you can use to sort a list of text
> alphabetically?
[quoted text clipped - 3 lines]
>
> Seems like a straightforward enough idea but I can't find anything.
paddyyates - 19 Dec 2005 17:11 GMT
That works, thanks. It seems the answer wasn't that straightforward!

Signature

paddyyates

Hash@example.org - 21 Dec 2005 03:12 GMT
A somewhat simpler method, requiring helper columns.  Assume your text
in A:A.

In B1: = IF(LEN(A1)>0,COUNTIF(A:A,"<"&A1),"")
gives a lexographical sorting number to each entry

In C1: = IF(LEN(A1)>,SMALL(B:B,ROW()),"")
Sorts the values.

In D1: = IF(LEN(A1)>0,INDEX(A:A,MATCH(C1,B:B,0),1),"")

Fill down past your data.  Can continue in this way to remove dupes.

...best, Hash

In article <paddyyates.20am2y_1135005304.861@excelforum-nospam.com>,
paddyyates <paddyyates.20am2y_1135005304.861@excelforum-nospam.com>
wrote:

> Does anyone know of a formula you can use to sort a list of text
> alphabetically?
[quoted text clipped - 3 lines]
>
> Seems like a straightforward enough idea but I can't find anything.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.