ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sort horizontally? (https://www.excelbanter.com/excel-discussion-misc-queries/160878-sort-horizontally.html)

Niniel

Sort horizontally?
 
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.



Mike H

Sort horizontally?
 
There is:-

Select your row then:-

data|Sort|Options|Left to right

Select ascending or descending
Click OK

Mike
"Niniel" wrote:

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.



Niniel

Sort horizontally?
 
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?

Mike H

Sort horizontally?
 
I suspect you would have to resort to VBA for that utilising something like
the worksheet_change event.

Mike

"Niniel" wrote:

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?


RagDyeR

Sort horizontally?
 
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))

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"Niniel" wrote in message
...
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?




Niniel

Sort horizontally?
 
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!


RagDyeR

Sort horizontally?
 
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.


--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"Niniel" wrote in message
...
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!




Niniel

Sort horizontally?
 
Thank you. Now my little calculator sheet looks even nicer. :)

RagDyeR

Sort horizontally?
 
You're welcome, and thanks for the feed-back.

--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

"Niniel" wrote in message
...
Thank you. Now my little calculator sheet looks even nicer. :)




All times are GMT +1. The time now is 08:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com