How do I sort several 4 digit numbers by the last 2 digits in exc.

G

Guest

I want to sort several 4 digit numbers by the last 2 digits in excel. Excel
defaults to sorting by the first 2 digits and I would like to change this
 
D

Dave Peterson

I'd use a helper column of cells and sort by that:

=mod(a1,100)

And drag down.
 
D

duane

i do not know...you could insert a column of =right(a1,2) (copied fo
the extent of your rows) and do the sort based on that - asuming your
digit #'s are in column
 
G

Guest

Dave Peterson said:
I'd use a helper column of cells and sort by that:

=mod(a1,100)

And drag down.


--

Dave Peterson
(e-mail address removed)
I am new to Excel and could you please explain what a helper column is and how to use it. Thanks in advance.
 
D

Dave Peterson

You have 256 columns in your worksheet.

A helper column is one of those empty columns that isn't being used. You'll use
it to "help" you accomplish something.

In this case, you'll use it to extract the last two digits and then use it for
the key for your sort.

===
In general, I like to have my helper columns near the original data. I'll
insert a column just to the right (or left) of the original data.

If I need to be able to do this thing over and over, I'll leave the column
there. (and if it's not pretty enough, I'll hide that column.)

If I only have to do this thing once, I'll do my stuff and then delete that
helper column.
 

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

Top