Sort horizontally?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I'm wondering if there's a way to arrange numbers from the largest to the
smallest when those numbers are in a row.
 
There is:-

Select your row then:-

data|Sort|Options|Left to right

Select ascending or descending
Click OK

Mike
 
Cool, that wasn't all that difficult.

Just out of curisosity - can this be programmed as well? So that when my
input cells get populated, I can pick up the re-arranged numbers in another
row without having to do anything else?
 
I suspect you would have to resort to VBA for that utilising something like
the worksheet_change event.

Mike
 
Say that your original numbers are in Row 1.

Enter this formula *anywhere* (except Row 1), and drag across to copy as
needed:

=LARGE(1:1,COLUMNS($A$1:A1))
 
Very cool!

I had to tinker with it a bit since I had other date in the same row that I
didn't want sorted, but I just moved my target data to an otherwise empty
row, so now it's working like a charm.

Thanks a lot!
 
You can configure the formula to reference a pre-determined range, so that
you could use the rest of the row for your other data.

For example, say your original numbers were only occupying, say 15 columns,
from V9 to AJ9.

You could then enter this formula *anywhere*:

=LARGE($V$9:$AJ$9,COLUMNS($A$1:A1))

Even in say B9, and copy it across to P9.
 
Back
Top