+ Reply to Thread
Results 1 to 7 of 7

VLOOKUP to pull data from multiple columns

  1. #1
    Registered User
    Join Date
    06-03-2013
    Location
    Urbana, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    57

    VLOOKUP to pull data from multiple columns

    Hello new friends

    I need to know how to use the vlookup fomula to pull data from multiple columns rather than just one so that when data is returned, data will populate multiple cells in a given row. Any ideas?

  2. #2
    Registered User
    Join Date
    08-20-2012
    Location
    High Wycombe, England
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: VLOOKUP to pull data from multiple columns

    can you upload a sample document and explain which rows you want to collate / what you actually want to happen so we can help please.
    Please add Rep if I've helped

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: VLOOKUP to pull data from multiple columns

    The third parameter of the VLOOKUP function determines which row in the lookup table you want to get the data from, e.g.:

    =VLOOKUP($A2,Sheet2!$A$1:$G$100,3,0)

    where the data is returned from the 3rd column (C) of the table A1:G100 on Sheet2.

    However, you can make this variable, so that as the formula is copied across the column number adjusts automatically, like this:

    =VLOOKUP($A2,Sheet2!$A$1:$G$100,COLUMNS($A:C),0)

    Here the term COLUMNS($A:C) initially returns 3, but as the formula is copied across this term will become COLUMNS($A:D), then COLUMNS($A:E), thus returning 4 then 5, and so on.

    Hope this helps.

    Pete

  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
    52,936

    Re: VLOOKUP to pull data from multiple columns

    vlookup syntax is...
    =VLOOKUP(what-you-want-to-find,range-to-search-in,column-that-contains-the-answer-you-want,FALSE) FALSE is for finding an exact match
    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

  5. #5
    Registered User
    Join Date
    06-03-2013
    Location
    Urbana, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: VLOOKUP to pull data from multiple columns

    Pete_UK

    Im using the formula buts its still only populating one cell.

  6. #6
    Registered User
    Join Date
    06-03-2013
    Location
    Urbana, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: VLOOKUP to pull data from multiple columns

    SampleWorkbook.xls

    Here is a sample workbook. I want to make it so that when I select branch manager on the user interface, it will populate cells A10 to C10 on the same page. The cells would contain the three names following the branch manager on the control interface.

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: VLOOKUP to pull data from multiple columns

    Put this in A10:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    then copy into B10 and C10.

    Use the drop-down in A1 to see the numbers change automatically.

    Hope this helps.

    Pete

+ 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