Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
anteaters00
 
Posts: n/a
Default How do I sort a column alphabetically not consider "the" or "a"?

I would like to sort a worksheet alphabetically ascending, but certain row
has "The" or "A" at the beginning, so the rows with "The" at the beginning
are arranged under "T" and the rows with "A" are categorized under "A". How
do I eliminate this problem without deleting "The" or "A"?
  #2   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Mon, 12 Sep 2005 16:28:03 -0700, "anteaters00"
wrote:

I would like to sort a worksheet alphabetically ascending, but certain row
has "The" or "A" at the beginning, so the rows with "The" at the beginning
are arranged under "T" and the rows with "A" are categorized under "A". How
do I eliminate this problem without deleting "The" or "A"?


Use a helper column.

In some blank column contiguous with your table (or you can insert a column),
enter this formula:

=IF(OR(LEFT(A2,1)="a",LEFT(A2,3)="the"),
TRIM(MID(A2,FIND(" ",A2),255)),TRIM(A2))

Then sort on this new column.

After you've done the sorting, you can delete the column.

If you need to do this frequently, you can record a macro.


--ron
  #3   Report Post  
Biff
 
Posts: n/a
Default

This doesn't work if the first word starts with an "A" or a "T". (other than
"A<space" and "The<space")

Biff

"Ron Rosenfeld" wrote in message
...
On Mon, 12 Sep 2005 16:28:03 -0700, "anteaters00"
wrote:

I would like to sort a worksheet alphabetically ascending, but certain row
has "The" or "A" at the beginning, so the rows with "The" at the beginning
are arranged under "T" and the rows with "A" are categorized under "A".
How
do I eliminate this problem without deleting "The" or "A"?


Use a helper column.

In some blank column contiguous with your table (or you can insert a
column),
enter this formula:

=IF(OR(LEFT(A2,1)="a",LEFT(A2,3)="the"),
TRIM(MID(A2,FIND(" ",A2),255)),TRIM(A2))

Then sort on this new column.

After you've done the sorting, you can delete the column.

If you need to do this frequently, you can record a macro.


--ron



  #4   Report Post  
Biff
 
Posts: n/a
Default

Correction:

This doesn't work if the first word starts with an "A" or a "T".


Should be:

This doesn't work if the first word starts with an "A" or "The".


Albany New York
Thermal California

If there is always a space after the "A" and the "The", maybe this:

=IF(LEFT(A1,2)="A ",MID(A1,3,255),IF(LEFT(A1,4)="The ",MID(A1,5,255),A1))

Biff

"Biff" wrote in message
...
This doesn't work if the first word starts with an "A" or a "T". (other
than "A<space" and "The<space")

Biff

"Ron Rosenfeld" wrote in message
...
On Mon, 12 Sep 2005 16:28:03 -0700, "anteaters00"
wrote:

I would like to sort a worksheet alphabetically ascending, but certain
row
has "The" or "A" at the beginning, so the rows with "The" at the
beginning
are arranged under "T" and the rows with "A" are categorized under "A".
How
do I eliminate this problem without deleting "The" or "A"?


Use a helper column.

In some blank column contiguous with your table (or you can insert a
column),
enter this formula:

=IF(OR(LEFT(A2,1)="a",LEFT(A2,3)="the"),
TRIM(MID(A2,FIND(" ",A2),255)),TRIM(A2))

Then sort on this new column.

After you've done the sorting, you can delete the column.

If you need to do this frequently, you can record a macro.


--ron





  #5   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Tue, 13 Sep 2005 00:15:20 -0400, "Biff" wrote:

This doesn't work if the first word starts with an "A" or a "T". (other than
"A<space" and "The<space")


Good pickup. (Although it would work properly with "T"; you probably meant
"The"

=IF(OR(LEFT(A2,1)="a ",LEFT(A2,3)="the "),
TRIM(MID(A2,FIND(" ",A2),255)),TRIM(A2))

should work.


--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running total w/2 columns - Excel Anna / Ideal Excel Worksheet Functions 14 August 10th 05 04:28 PM
match and count words David Excel Worksheet Functions 5 July 4th 05 02:24 AM
up to 7 functions? ALex Excel Worksheet Functions 10 April 12th 05 06:42 PM
How do I sort a column of formulas in Excel? Gordon Excel Discussion (Misc queries) 2 November 27th 04 01:55 AM
How do I sort a column of formulas in Excel? Gordon Excel Discussion (Misc queries) 0 November 26th 04 03:19 PM


All times are GMT +1. The time now is 02:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"