sort column by last digit

  • Thread starter Thread starter Kepf
  • Start date Start date
K

Kepf

Lets say I have a column like:

12435G
19995
188884G
188465
277745
etc etc etc

...and I want to sort it so that the ones that end with the letter G
are isolated. Is there a way to do this?
 
In a helper column, add

=IF(RIGHT(A1)="G","G","")

then sort by the helper column.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
If you also want the numeric part sorted, you will need another helper
column.

Assuming Bob's helper column is B
=IF(B1="G",VALUE(LEFT(A1,LEN(A1)-1)),A1)
then sort the data by column B then C
If you want the Gs at the top, sort column B descending.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top