• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Set reverse order of a several rows in column using formula

Atanu Chanda

New Member
Hello Friends,


I have entered data in a propriety software of our company and the first data entered gets stored in it as last row.

Data entry 1: Row 1 : 2315


Data entry 2: Row 1 : 2715

Row 2 : 2315 and so on.


The data entered is random and I cannot sort it in anyway to get it back in its original order when exported to excel from the application.


My data is kind of :

4718

4238

7356

2156

2715

2315


and I want this in inverse order. Is there any formula to do so without the help of VBA.


Any help, much appreciated.
 
Hi, Atanu Chanda!


Let's suppose you have your data like this:

[pre]
Code:
Original Data  Inversed order data  6
4718           2315
4238           2715
7356           2156
2156           7356
2715           4238
2315           4718
[/pre]

Column A, your original data. Column B, the inversed data you want. Cell C1, number or items in A.


Try this:

a) Define a named range TableOriginal from A2:A7

b) type in C1: =CONTAR(TableOriginal) -----> in english: =COUNT(TableOriginal)

c) type in B2: =DESREF(TableOriginal;$C$1-FILA()+1;0;1;1) -----> in english: =OFFSET(TableOriginal,$C$1-ROW()+1,0,1,1)

d) copy down B2 to B3:B7


Regards!
 
Hi Atanu Chanda, SirJB7 & NARAYANK991,


This formula is also giving similar results:

=OFFSET($C$1,LARGE(--ROW($C$1:$C$6)-1,ROW($A1)),0) [Ctrl+Shift+Enter]


Where... C1:C6 occupy the original list and D1:D6 contains reversed list. ;)


Regards
 
Hi,


Here's a shorter version, assuming the data is in C1:C6 and formula in D1 copy down


=INDEX($C$1:$C$6,ROWS(C1:$C$6))
 
Back
Top