+ Reply to Thread
Results 1 to 4 of 4

rearranging data in spreadsheet

Hybrid View

  1. #1
    Registered User
    Join Date
    10-21-2009
    Location
    Philadelphia
    MS-Off Ver
    Excel 2003
    Posts
    10

    rearranging data in spreadsheet

    I have a spreadsheet in the format below. I've also attached the spreadsheet as a reference. Column "A" can contain the values A,C,E,F,G,H. Column "B" is a sorted numeric value. Column "C" is a numeric value, 2 decimal places.

    I would like to consolidate into a single row for the duplicate entries in column "B". There should be 6 new columns corresponding to the value in column A, but that entry should be the correlating entry from column "C", OR BLANK IFTHERE IS NO VALUE. At that point I no longer need the contents of the original column "A".

    Example input:

    C 110440 2.12
    F 110440 1.83
    G 110440 3.00
    A 130138 1.67
    E 130138 2.39
    F 130138 1.92

    Example output:

    (header row included for clarity, and I used periods as separators as tabs don't show up properly)

    Value...........A..........C..........E..........F..........G..........H
    110440.....................2.12.................1.83......3.00.......
    130138........1.67..................2.39......1.92...................
    Attached Files Attached Files
    Last edited by moldoverb; 10-23-2009 at 10:14 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: rearranging data in spreadsheet

    Pivot table is the quickest way
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    10-21-2009
    Location
    Philadelphia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: rearranging data in spreadsheet

    Quote Originally Posted by Andy Pope View Post
    Pivot table is the quickest way
    I can't believe I spent time looking for a complex way to do this. I was going to write perl script if I couldn't figure this out in Excel. I'm buried in a large statistical analysis on my server (unix), and sometimes easy answers elude me. Doh!

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: rearranging data in spreadsheet

    One approach

    Use data filter advanced to extract a unique list of column B values listed vertically, and similarly a unique list of column A values listed horizontally.i.e. the row and column labels.

    Now add a helper column (say D) to your original data which concatenates the A & B cells, e.g. C110440.

    Now you can use =MATCH() and =INDEX() to obtain your results.
    So assuming your table headers are in column F & row 1 in G2 enter

    =INDEX(C:C,Match(G$1&$F2,D:D,False),1)
    and copy down and across your table.

    HTH
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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