+ Reply to Thread
Results 1 to 4 of 4

Converting Vertical Data to Horizontal

  1. #1
    Registered User
    Join Date
    09-15-2008
    Location
    New York
    Posts
    2

    Converting Vertical Data to Horizontal

    I have a set of data that reads like this

    Country1 Year1 Value1
    Country1 Year2 Value2
    Country1 Year3 Value3
    Country2 Year1 Value1
    Country2 Year2 Value2
    Country2 Year3 Value3
    Etc...

    I would like to create a sheet that reads like this:

    year1 year2 year3
    Country1 value1 value2 value3
    Country2 value1 value2 value3
    Etc...

    Could someon please explain to me how I can do this.

    Thank you very much

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,077

    Smile

    If there's always three values for each country, try this...

    Assuming the data starts in A1...

    in D1 enter =C1
    in E1 enter =C2

    Then copy D1:E3 and paste down the sheet.

    Copy columns D and E and Paste Special values only.

    Now select columns A to E and sort by column D and column E

    The data for columns D and E should be at the top of the sheet
    and the blank D and E rows should be at the bottom of the sheet.

    Delete the blank D and E rows.

    Delete column B

    Insert a row and enter the y1 y2 y3 header row

    ...and I think that should be it.

    I got a funny feeling you're gonna tell me that there's not always three values for each country in which case this won't work
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848
    Take a look at pivot tables - you can find it under the Data menu.

  4. #4
    Registered User
    Join Date
    09-15-2008
    Location
    New York
    Posts
    2
    Thank you both for the reply. Pivot tables were exactly what I needed.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Converting different time formats to useable data.
    By Yappa in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-25-2008, 11:10 AM
  2. Excel - Converting HEX data
    By trawlston in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-23-2008, 07:38 PM
  3. DDE Macros and data formatting
    By JMann in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-28-2008, 05:33 AM
  4. Converting data from columnar to row format
    By neutie88 in forum Excel General
    Replies: 6
    Last Post: 03-26-2007, 10:09 PM
  5. Moving cells from vertical to horizontal
    By pete_c in forum Excel General
    Replies: 3
    Last Post: 03-18-2007, 05:09 PM

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