ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Is there an formula to reverse the order of a number sequence? (https://www.excelbanter.com/excel-discussion-misc-queries/116961-there-formula-reverse-order-number-sequence.html)

[email protected]

Is there an formula to reverse the order of a number sequence?
 


Jim Rech

Is there an formula to reverse the order of a number sequence?
 
I've seen it done but I cannot mentally resurrect the formula right now.
This is a simple way to do it but it has a kludgy stipulation.

=INDEX($A$1:$A$10,COUNT(A1:A10))

Enter this in say, C1, and copy it down to C10. The numbers in A1:A10 will
appear reversed IF the cells A11:A20 are all empty. That's the
stipulation - a range of equal length below the numbers must remain empty.

Perhaps I've inspired someone to provide a better answer...

--
Jim
" wrote
in message ...
|



Ron Rosenfeld

Is there an formula to reverse the order of a number sequence?
 
On Tue, 31 Oct 2006 19:22:01 -0800,
wrote:

Where is the number sequence located?
In a cell?
In a range of rows?
In a column?

How do you want the reversed sequence outputted?
In a cell?
In a range of rows?
In a range of columns?
In a text box?

If they are in a column, and you want them listed in another column in reverse
order, then

=INDEX(rng,COUNT(rng)+1-ROWS($1:1))

and drag down as far as necessary.
--ron

Gord Dibben

Is there an formula to reverse the order of a number sequence?
 
Jim

Without the stipulation that A11:A20 are empty.

=INDEX($A$1:$A$10,10-(ROW(A1)-1))

Enter in C1 and copy down to C10


Gord Dibben MS Excel MVP

On Wed, 1 Nov 2006 08:12:50 -0500, "Jim Rech" wrote:

I've seen it done but I cannot mentally resurrect the formula right now.
This is a simple way to do it but it has a kludgy stipulation.

=INDEX($A$1:$A$10,COUNT(A1:A10))

Enter this in say, C1, and copy it down to C10. The numbers in A1:A10 will
appear reversed IF the cells A11:A20 are all empty. That's the
stipulation - a range of equal length below the numbers must remain empty.

Perhaps I've inspired someone to provide a better answer...




All times are GMT +1. The time now is 02:03 PM.

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