+ Reply to Thread
Results 1 to 11 of 11

vlookup to retun multiple column values against multiple columns

  1. #1
    Registered User
    Join Date
    12-05-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    42

    vlookup to retun multiple column values against multiple columns

    Hi

    I have tried to find the answer to this but it seems that most of the answers are not exactly like my request...

    So I have one sheet of data, lets call this Hardware1 (all columns are populated)

    Item make model serial build location
    server1
    server2
    server3
    server4

    and another sheet of data, lets call this hardware2

    Item make model serial build location
    server1 hp etc 1234 etc florida
    server2 solaris 1234 mahve desert
    server3 dell 1234 chippingnorton
    server4 hp


    I would usually do this using one lookup formula in each column to retrieve each colums data. For example to find the make for each server, it would look something like this - =vlookup(hardware1!A2:A1378,B2:B1378,2,false) I would drag the formula down so all servers have their make populated. Then I would do this again in the model column and repeat for each column

    I would like to update the columns for make model, serial etc of sheet hardware1 with the information from hardware2 using only one lookup/formula so I don't have to have to do multiple lookups each time,.

    many thanks!

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: vlookup to retun multiple column values against multiple columns

    Please attach a sample sheet. It's hard to tell what is where, given the formatting of your post.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: vlookup to retun multiple column values against multiple columns

    How to attach a sheet:
    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

  4. #4
    Registered User
    Join Date
    12-05-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    42

    Re: vlookup to retun multiple column values against multiple columns

    thanks Ive have added a sheet showing the two hardware tabs and a desired results sheet showing an example of how I would do it with multiple lookups
    Attached Files Attached Files

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: vlookup to retun multiple column values against multiple columns

    Is this what you meant (desired results, B2, copied across and down)?

    =VLOOKUP($A$2:$A$23,hardware2!$A$2:$D$19,COLUMNS($A:B),FALSE)

    If not, please explain again, but it is beginning to sound like you want a formula and a value in the one cell: which you can't have...

  6. #6
    Registered User
    Join Date
    12-05-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    42

    Re: vlookup to retun multiple column values against multiple columns

    I would like to update hardware1 with any changes that appear in hardware2

    So the desired results sheet shows 3 lookups in each column, showing the server names from hardware1 and the updates to make model or serial from hardware2

    I would like if possible one formula to show these results, rather than writing

    3 lookups (or in reality, a whole lot more in a sheet with many columns)

    thanks

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: vlookup to retun multiple column values against multiple columns

    You DO want a formula and a value in the one cell: which you can't have, without VBA (I think... and I'm certainly out at that point)...

  8. #8
    Registered User
    Join Date
    12-05-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    42

    Re: vlookup to retun multiple column values against multiple columns

    oh no, ok thanks for your help anyway

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: vlookup to retun multiple column values against multiple columns

    On re-reading your comments... did you actually apply my formula to your sheet?? It updates values with one formula, to give EXACTLY what you asked for in your desired results.
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: vlookup to retun multiple column values against multiple columns

    Update to Glenn's formula:

    =IFERROR(VLOOKUP($A$2:$A$23,hardware2!$A$2:$D$19,COLUMNS($A:B),FALSE),VLOOKUP($A$2:$A$23,hardware1!$A$2:$D$19,COLUMNS($A:B),FALSE))

    If no data in Hardware2, then use Hardware1.

  11. #11
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: vlookup to retun multiple column values against multiple columns

    Just a bit shorter
    Enter in B2 on the result sheet, copy across and down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by AlKey; 10-07-2016 at 07:50 AM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ 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. Replies: 6
    Last Post: 08-19-2015, 07:46 PM
  2. [SOLVED] Vlookup returning multiple values in different columns
    By brinnt in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-18-2014, 01:45 PM
  3. VLookup to return multiple values from different columns in same cell
    By sonnek in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-09-2013, 05:11 PM
  4. Vlookup - when column contains multiple values
    By akamie in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-07-2011, 05:43 PM
  5. Replies: 5
    Last Post: 04-21-2011, 05:22 PM
  6. Vlookup to retun multiple values.
    By prasjohn in forum Excel General
    Replies: 2
    Last Post: 06-19-2010, 02:59 PM
  7. Help, Vlookup for multiple values in one column
    By jws34 in forum Excel General
    Replies: 0
    Last Post: 04-13-2005, 11:49 AM

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