+ Reply to Thread
Results 1 to 4 of 4

flipping (not transposing) data?

Hybrid View

  1. #1
    Registered User
    Join Date
    05-24-2007
    Posts
    73

    flipping (not transposing) data?

    I have two very long columns of data. I would like to flip them. For example, there are 6028 lines of data. I would like to see data on line 6028 on line 1 and data from line 6027 on line 2, so on and so forth. Can this be done?

    Thanks

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: flipping (not transposing) data?

    Have you tried numbering a new column 6028, 6027, etc., then sorting it?
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Re: flipping (not transposing) data?

    Hi

    Try the following code.

    Sub Macro1()
    
        Application.ScreenUpdating = False
    
        Let Cells(1, 1).Value = 1
        Let Cells(2, 1).Value = 2
    
        Set SourceRange = Range("A1:A2")
        Set fillRange = Range("A1:A50000")
        SourceRange.AutoFill Destination:=fillRange
    
        Range("a1:c50000").Sort Key1:=Range("a1"), Order1:=xlDescending, Header:=xlGuess, _
                                OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
        Range("a1:a50000").ClearContents
    
        Application.ScreenUpdating = True
    
    End Sub
    This is for 50000 lines and two columns, just substitute your values appropriately.

    Regards

    Jeff

  4. #4
    Registered User
    Join Date
    05-24-2007
    Posts
    73

    Re: flipping (not transposing) data?

    thanks, the numbering of columns worked easily.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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