+ Reply to Thread
Results 1 to 4 of 4

Transposing matching lists onto 1 horizontal line of data

  1. #1
    Registered User
    Join Date
    02-27-2014
    Location
    Hants
    MS-Off Ver
    Excel 2003
    Posts
    17

    Transposing matching lists onto 1 horizontal line of data

    Hello,

    I have two columns of data, names and numbers:

    Tom 642
    Ram 484
    Matt 526

    The numbers are linked with the names. I want to be able to have a cell, where I can put in the name and it will provide me their number.

    I am currently using this for the two columns: =INDEX(O$#:O$#,MATCH(D#,P$#:P$#,0)) however I would like a code to allow me to do this if all of the data is on one line like this:

    Tom, Ram, Matt, 642, 484, 526

    So I still want excel to recognise the cell A1 (tom) is matched with the number in A4 (642).

    Thanks,
    Matt

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Transposing matching lists onto 1 horizontal line of data

    See is this example will give you what you want...
    A
    B
    C
    D
    E
    F
    1
    aa bb cc
    11
    22
    33
    2
    cc
    3
    33


    A2 is your search criteria
    A3=OFFSET(A1,0,MATCH(A2,1:1,0)+COUNT(1:1)-1)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Transposing matching lists onto 1 horizontal line of data

    Another option, in my example, data is in A1:B?

    In D1, copied to the right

    =IFERROR(INDEX($A$1:$B$500,MOD(COLUMNS($A$1:A$1)-1,COUNTA($A:$A))+1, INT((COLUMNS($A$1:A$1)-1)/COUNTA($A:$A))+1),"")
    Does that work for you?
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Transposing matching lists onto 1 horizontal line of data

    Thanks for the feedback

+ 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. Transposing repeating vertical data to horizontal data but retaining unique values only
    By mgcarino14 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2014, 12:57 AM
  2. Transposing Data from Horizontal to Vertical
    By OTexcel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-16-2012, 08:28 PM
  3. Transposing vertical data sets to horizontal positions
    By Ricker090 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-08-2011, 01:40 PM
  4. Replies: 5
    Last Post: 04-23-2010, 08:01 AM
  5. Replies: 5
    Last Post: 08-01-2006, 12:23 AM

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