+ Reply to Thread
Results 1 to 16 of 16

Two lists of data, need results from both lists - possible vlookup

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

    Two lists of data, need results from both lists - possible vlookup

    Hi people

    I am pulling my hair out with this one.

    I have two lists of data. One list shows a site name and the other list has a technbology at the site

    and I need to create an new sheet that shows the technology at that site (there are 20 different technologies and over 300 sites)

    for example

    Site 1 servers
    site 1 desktops
    site 2 servers
    site 3 laptops
    site 3 servers
    site 4 desktops
    site 5 APs
    site 6 desktops
    site 6 servers

    I want to show

    site 1 servers, desktops
    site 2 servers
    site 3 laptops, servers
    site 4 desktops
    site 5 APs
    site 6 desktops, servers


    It doesnt really matter how the data is presented, I just need to know how to obtain the information from List 1 without resorting to multiple instances of vlookup

    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 2406
    Posts
    44,662

    Re: Two lists of data, need results from both lists - possible vlookup

    What is in which column(s)?
    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly 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.
    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

  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 2406
    Posts
    44,662

    Re: Two lists of data, need results from both lists - possible vlookup

    Re-read it. I get it now.

    To return an alphabetically sorted list of sites (in a2, an array formula):

    =IFERROR(INDEX(Sheet1!$A$2:$A$10, MATCH(MIN(IF(COUNTIF($A$1:A1, Sheet1!$A$2:$A$10)=0, 1, MAX((COUNTIF(Sheet1!$A$2:$A$10, "<"&Sheet1!$A$2:$A$10)+1)*2))*(COUNTIF(Sheet1!$A$2:$A$10, "<"&Sheet1!$A$2:$A$10)+1)), COUNTIF(Sheet1!$A$2:$A$10, "<"&Sheet1!$A$2:$A$10)+1, 0)),"")

    To return tech, in B2, copied across and down, another array formula:
    =IFERROR(INDEX(Sheet1!$B:$B,SMALL(IF(Sheet1!$A$2:$A$10=$A2,ROW(Sheet1!$A$2:$A$10)),COLUMNS($B:B))),"")

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files

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

    Re: Two lists of data, need results from both lists - possible vlookup

    Document attached

    as I said, its doesnt really matter how the results are presented (sheet 2 is the desired results)

    I need to know how to obtain the data from sheet 1

    thanks
    Attached Files Attached Files

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

    Re: Two lists of data, need results from both lists - possible vlookup

    Blimey that was quick. I will digest that and try it on the real data and report back.. But initially, thanks very much

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

    Re: Two lists of data, need results from both lists - possible vlookup

    If you don't mind them being unsorted:

    =IFERROR(INDEX(Sheet1!$A$2:$A$10,MATCH(0,INDEX(COUNTIF($A$1:$A1,Sheet1!$A$2:$A$10),0),0)),"")

    This will still be slow, but will be quicker than the forst one. You can always run this, then sort the data and then apply tyhe second formula...

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

    Re: Two lists of data, need results from both lists - possible vlookup

    Hi, ok I need a bit of a walkthrough on this.. If I am starting with the first list in sheet1, where do I put the first array formula? and then the next one.. etc

    thanks

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

    Re: Two lists of data, need results from both lists - possible vlookup

    here is your example back again, with the formulae in place.

    You MUST have a header row/blank row in sheet2 (where the results are going)
    Attached Files Attached Files

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

    Re: Two lists of data, need results from both lists - possible vlookup

    Thanks. I have pasted my full list into the sheet and it only returns the first 3 rows

    What do I need to do to apply it to the whole sheet (5000 lines)?

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

    Re: Two lists of data, need results from both lists - possible vlookup

    Change the ranges in the formulae to cover the 5000 rows.

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

    Re: Two lists of data, need results from both lists - possible vlookup

    Sorry, I really need an idiots guide on this - I have changed the ranges that apply to the first sheets rows 1 - 9 but I still only get 3 values (and circular references is shown at the bottom corner of the sheet

    So I have changed the formula to =IFERROR(INDEX(Sheet1!$A$1:$A$9,MATCH(0,INDEX(COUNTIF($A$1:$A1,Sheet1!$A$1:$A$5639),0),0)),"")

    in the first column

    and =IFERROR(INDEX(Sheet1!$B:$B,SMALL(IF(Sheet1!$A$1:$A$5639=$A2,ROW(Sheet1!$A$1:$A$5639)),COLUMNS($B:B))),"")

    in the second column

    then hit ctr, shft and enter

    There must be something small I am doing wrong

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

    Re: Two lists of data, need results from both lists - possible vlookup

    First formula... you need to change the INDEX bit to 5639 as well....

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

    Re: Two lists of data, need results from both lists - possible vlookup

    Doh. Ok sorted that, then I have dragged the formula down

    Now when I hot ctrl, shift enter on the second column it just brings up a circular references error

    any ideas?

  14. #14
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,372

    Re: Two lists of data, need results from both lists - possible vlookup

    Could you upload a SMALL sample of the file that is showing the circular reference error?
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

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

    Re: Two lists of data, need results from both lists - possible vlookup

    Im going to mark this as solved - as Glenn has been very helpful

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

    Re: Two lists of data, need results from both lists - possible vlookup

    Have you still got a circular reference error? Can u=you post a mock-up showing the problem? There's little point in having half a solution....

+ 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. [SOLVED] Three Data Validation Lists: Third List works from first two Lists BUT...
    By em1335 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-07-2016, 12:46 AM
  2. [SOLVED] data validation lists - drop down lists too small
    By reglook0736 in forum Excel General
    Replies: 3
    Last Post: 04-24-2015, 12:49 PM
  3. VLOOKUP and data validation lists
    By traugotts in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-09-2015, 11:22 AM
  4. Replies: 16
    Last Post: 06-13-2014, 12:14 PM
  5. [SOLVED] Data Validation : 2 Lists dependant on selection with vlookup for 3rd value
    By scwillyb in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-26-2014, 02:25 PM
  6. How can I make new lists based on results from other lists?
    By wardlowe in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 05-02-2013, 12:36 AM
  7. Replies: 3
    Last Post: 09-02-2010, 03:04 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