+ Reply to Thread
Results 1 to 4 of 4

Invert columns

  1. #1
    Forum Contributor
    Join Date
    03-04-2008
    Location
    Ohio
    MS-Off Ver
    Office 2010
    Posts
    208

    Invert columns

    I'm looking for a simple way to take a column of data and restack it in reverse order. The data isn't necessarily in alphabetical or numerical order, i.e. 2, 5, 7, 3, 4, 9, etc. The sequence is important. If this data is in a column, I want to restack in reverse order, namely, 9, 4, 3, 7, 5, 2.

    Thanks for the help.

    (Love this forum.) I look so cool because of all your help.
    Last edited by VBA Noob; 07-30-2008 at 04:39 PM.

  2. #2
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    Hi

    Assuming data in A1:A100:

    =INDEX($A$1:$A$100,ROWS($A$1:$A$100)-ROWS($A$1:$A1)+1)

    in column B1 copied down to B100.

    Richard

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Invert columns

    With
    A1:A6 containing your list: 2,5,7,3,4,9

    If you want to actually reorder A1:A6,
    Maybe this?....
    B1: =ROW()
    Copy B1 down through B6.

    Now you have your list in Col_A
    and an ascending series of numbers in Col_B

    Select A1:B6

    From the Excel Main Menu:
    <data><sort>
    Sort by: Column_B: Descending.

    Col_A will be listed in reverse order: 9,4,3,7,5,2
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Forum Contributor
    Join Date
    03-04-2008
    Location
    Ohio
    MS-Off Ver
    Office 2010
    Posts
    208
    Thanks for the tips. The formula works great in a group of cells. But I'm trying to incorporate it into my macro. It's part of a data cleanup for some other (much bigger) spreadsheets. The more automation, the better. I posted a new question here: http://www.excelforum.com/showthread...58#post1950458

    Thanks for the help. Much appreciated.

    Regards,
    -gshock

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1