Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
mbparks
 
Posts: n/a
Default Sort by last 2 digits

I would like to sort a column by the last 2 digits of the cell entry. The
entries will begin with 2 to 3 letters followed by 7 numeric digits. Example:
BY0123456.
I would like to sort using the 56. How can I accomplish this?
  #2   Report Post  
Dan Knight
 
Posts: n/a
Default

A simple solution would to add a column that contains the formula
=Right(OrigDataCellAddress,2), which returns the last two characters of the
original cell; Then sort on this new column.

The downside to this is that if the last 2 characters are numbers and the
second last character is a zero, then it will only return the last character,
because the returned value is a number. To overcome this, you would have to
use the Text() function.

Dan Knight

"mbparks" wrote:

I would like to sort a column by the last 2 digits of the cell entry. The
entries will begin with 2 to 3 letters followed by 7 numeric digits. Example:
BY0123456.
I would like to sort using the 56. How can I accomplish this?

  #3   Report Post  
Jason Morin
 
Posts: n/a
Default

Pull out the last 2 digits into a new column using:

=RIGHT(A1,2)

Then select all columns with data and sort based on this
new column.

HTH
Jason
Atlanta, GA

-----Original Message-----
I would like to sort a column by the last 2 digits of

the cell entry. The
entries will begin with 2 to 3 letters followed by 7

numeric digits. Example:
BY0123456.
I would like to sort using the 56. How can I accomplish

this?
.

  #4   Report Post  
Jason Morin
 
Posts: n/a
Default

Actually, the returned value will be a text string. The
formula won't drop the zero.

Jason

-----Original Message-----
A simple solution would to add a column that contains

the formula
=Right(OrigDataCellAddress,2), which returns the last

two characters of the
original cell; Then sort on this new column.

The downside to this is that if the last 2 characters

are numbers and the
second last character is a zero, then it will only

return the last character,
because the returned value is a number. To overcome

this, you would have to
use the Text() function.

Dan Knight

"mbparks" wrote:

I would like to sort a column by the last 2 digits of

the cell entry. The
entries will begin with 2 to 3 letters followed by 7

numeric digits. Example:
BY0123456.
I would like to sort using the 56. How can I

accomplish this?
.

  #5   Report Post  
mbparks
 
Posts: n/a
Default

Thanks millions and millions to all...

"mbparks" wrote:

I would like to sort a column by the last 2 digits of the cell entry. The
entries will begin with 2 to 3 letters followed by 7 numeric digits. Example:
BY0123456.
I would like to sort using the 56. How can I accomplish this?

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
How do I sort by row instead of by column? PercivalMound Excel Worksheet Functions 7 August 28th 06 11:41 PM
Sort Function Without Using VBA ExcelMonkey Excel Worksheet Functions 10 February 10th 05 11:24 AM
"-" ignored in sort Mike H Excel Discussion (Misc queries) 8 January 2nd 05 08:48 AM
Excel Sort function should not sort the cell formatting! Lisa D.N.1 Excel Worksheet Functions 1 December 28th 04 09:37 PM
Data > Sort function amnesia? Dave D Excel Discussion (Misc queries) 1 November 29th 04 11:44 PM


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

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

About Us

"It's about Microsoft Excel"