Excel: Method to Reverse a Column of Values

Last reviewed: November 30, 1994
Article ID: Q78342
The information in this article applies to:
  • Microsoft Excel for Windows versions 2.x, 3.0, 4.0
  • Microsoft Excel for OS/2 versions 2.2 and 3.0
  • Microsoft Excel for the Macintosh version 2.x, 3.0, 4.0

SUMMARY

It is possible to reverse the order of a column of values in Microsoft Excel by using the following formula:

   =INDEX(Range,ROWS(Range)-ROW(Reference)+ROW(RowReference),1)

MORE INFORMATION

The following is a description of the arguments to the formula shown above:

  • "Range" is an absolute reference to the range to be flipped.
  • "Reference" is a relative reference to the first cell in the range to be flipped.
  • "RowReference" is an absolute reference to the first cell in the range to be flipped.

Values in a column can be flipped by using the formula

   =INDEX(Range,1,COLUMNS(Range)-COLUMN(Reference)+COLUMN(RowReference))

Example

  1. Enter the following values into a worksheet:

       A1: a     B1: =INDEX($A$1:$A$4,ROWS($A$1:$A$4)-ROW(A1)+ROW($A$1),1)
       A2: z     B2:
       A3: d     B3:
       A4: k     B4:
    
    

  2. Select cells B1:B4. From the Edit menu, choose Fill Down from the Edit menu. The formula will fill down and the following values are displayed in cells B1:B4:

          B1: k
          B2: d
          B3: z
          B4: a
    

Be sure that all references in the formula are entered as absolute references (with dollar signs), except the argument in the first ROW function. That argument must be entered as a relative reference to fill down properly.

REFERENCES

"Function Reference," version 4.0, pages 236, 364, 366

"Microsoft Excel Function Reference," version 3.0, pages 127, 201, 202


KBCategory: kbusage
KBSubcategory:

Additional reference words: 2.0 2.00 2.01 2.1 2.10 2.2 2.20 2.21 3.0
3.00 4.0 4.00


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 30, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.