+ Reply to Thread
Results 1 to 30 of 30

VLOOKUP between two sheets including entire row

  1. #1
    Registered User
    Join Date
    06-27-2014
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2007
    Posts
    50

    VLOOKUP between two sheets including entire row

    Hello,

    I have a single column of values as well as a table with a column that includes those same values but also many more. I want to look up the list of values I have in the table and then see the entire row in the table for each value I looked up. I want to be able to look up all the values at one as there are about 100,000 of them. Any thoughts? Help is much appreciated.

    Thank you.

  2. #2
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: VLOOKUP between two sheets including entire row

    So, you have a small list in one column of A B C D, and a table that includes the whole alphabet in the first column, but other data associated to each letter as well. You want to see the other data associated when you lookup from the single column of A B C D?

    Can you use one vlookup per column and get the whole row of data that way?

    =vlookup(a1,$c$2:$h$100000,COLUMNS($A$1:A1)+1,False)

    Copied all the way across?
    Last edited by Speshul; 06-27-2014 at 05:18 PM.

  3. #3
    Registered User
    Join Date
    06-27-2014
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: VLOOKUP between two sheets including entire row

    I have a huge database with columns such as address, name, phone number, license number etc.. and then I have on list of license numbers. I want to look up those license numbers in the table and be able to see the entire row for each number I look up. The table has about 200,000 rows and the list has about 100,000 values.

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,080

    Re: Look up multiple values in a column and their corresponding rows

    VLOOKUP or MATCH may provide solutions.

    Prob best post an example spreadsheet with a some test data.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  5. #5
    Valued Forum Contributor TheCman81's Avatar
    Join Date
    11-06-2012
    Location
    Edinburgh, UK
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013
    Posts
    346

    Re: Look up multiple values in a column and their corresponding rows

    Does this do what you need? If not can you supply some sample data?

    samv1.xlsx
    Excel Guru in the making

    <----------If the question has been answered to your satisfication please click the Add Repuation star to the left

  6. #6
    Registered User
    Join Date
    06-27-2014
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Look up multiple values in a column and their corresponding rows

    I am new to this program so I am not sure if the attachment is on here now. I attached sample data with the table and the column of values. I need to look up the column of NPI Numbers in the table. You should be able to see the field "NPI Number (National Provider Identifier)" in the table. When the values are returned I want their entire row to be returned as well so that I can compare the rows.

    Thanks
    Last edited by samdahlr; 06-30-2014 at 05:32 PM.

  7. #7
    Registered User
    Join Date
    06-27-2014
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Look up multiple values in a column and their corresponding rows

    Basically I am trying to dedupe the contacts but instead of just deleting all duplicate rows and keeping one random row, I need to keep the row that contains the most information for that contact.

  8. #8
    Registered User
    Join Date
    06-27-2014
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Look up multiple values in a column and their corresponding rows

    I am not sure how to go about applying this formula to my data. Could you please explain?

  9. #9
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Look up values in a table and return the entire row with the value

    =iferror(VLookup(A2,table!A2:AF1078,2.0),"")
    Last edited by oeldere; 06-30-2014 at 05:24 PM. Reason: ,"") added
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  10. #10
    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: Look up values in a table and return the entire row with the value

    Hi.

    I have removed your file, it looked like it had personal info in it (email addy, phone numbers etc) It is never a good idea to post info of that nature on a public forum
    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

  11. #11
    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: Look up values in a table and return the entire row with the value

    @ oeldere, I think your formula is missing a few things?

    maybe...
    =iferror(VLookup(A2,table!$A$2:$AF$1078,2,0),"")

  12. #12
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Look up values in a table and return the entire row with the value

    I already changed the code. Thanks anyway.

    Please Login or Register  to view this content.

  13. #13
    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: Look up values in a table and return the entire row with the value

    Sam, if you intend using column R on Table "NPI Number (npi)", I see you have multiple duplicates in that column, and in most of the other columns, the data seems to match, but not all columns. How do you intend handling that?

  14. #14
    Registered User
    Join Date
    06-30-2014
    Location
    United States
    MS-Off Ver
    Windows 7 and 8.1
    Posts
    2

    Re: VLOOKUP between two sheets including entire row HELP Needed!!!

    PROBLEM:

    I am trying to take the reading(s) from all three types of gas (D, H, M) and convert these figures from inches to gallons. The result then would go into Column(s) D, I, N (on appropriate row).

    I created a vlook table on a separate sheet, because I have to do this monthly.

    I also have a Monthly Template sheet (Mnth Temp) with no figures or formula.

    Any help world be greatly appreciated.
    Thank you in advance. Shari
    Attached Files Attached Files

  15. #15
    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: VLOOKUP between two sheets including entire row

    UR Taxfriend, welcome to the forum

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

  16. #16
    Registered User
    Join Date
    06-30-2014
    Location
    United States
    MS-Off Ver
    Windows 7 and 8.1
    Posts
    2

    Re: VLOOKUP between two sheets including entire row

    Dear Sir, my apologies, this was my first/last forum attempt. I tried and tried to start a new thread. When I was unsuccessful time after time, I got so fustrated. I thought if I posted anywhere then hopefully someone would guide me. That was not the case here. In stead I receive a reply stating I had broken some GOLDEN rule. Heaven for bid someone makes an error. I will be removing my user information tomorrow.

    Fortunately I was able to resolve my question on my own.
    Again my apologies for my error.

    Sincerely
    Ur Taxfriend
    Last edited by UR TaxFriend; 07-01-2014 at 01:41 AM.

  17. #17
    Registered User
    Join Date
    06-27-2014
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Look up values in a table and return the entire row with the value

    If the data does not match between two contacts I can look up the correct data in another database. I just need a fast way to do all of this due to their being so many contacts.

  18. #18
    Registered User
    Join Date
    06-27-2014
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: VLOOKUP between two sheets including entire row

    @FDibbins any more suggestions?

  19. #19
    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: VLOOKUP between two sheets including entire row

    I removed your workbook because it had personal info in it. If you can remove those parts, then upload the WB again

  20. #20
    Registered User
    Join Date
    06-27-2014
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: VLOOKUP between two sheets including entire row

    Yes, my mistake.

    Here is a much smaller sample set of my situation. If you can show me how to look up the Phone Numbers in sheet 2 in the table in sheet 1 and how the rest of the row for each phone number looked up align with the returned value that would be great! I am not very advanced with excel so you might have to go into detail a little. Thank you for your help.
    Attached Files Attached Files

  21. #21
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: VLOOKUP between two sheets including entire row

    Based on your example, you have to use a index / match formula.

    b2 =
    Please Login or Register  to view this content.

    This is another example as you earlier provided.

    In #9 I gave you this formula to solve the problem.

    Please Login or Register  to view this content.
    Last edited by oeldere; 07-01-2014 at 01:09 PM. Reason: this i another example as etc.

  22. #22
    Registered User
    Join Date
    06-27-2014
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: VLOOKUP between two sheets including entire row

    When I enter the first formula in B2 of the List sheet it says #N/A

  23. #23
    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: VLOOKUP between two sheets including entire row

    OK assuming you want to have the info from Table, populate List, then 1st, copy the headings across from Table to List. Then use this, copied down and across...
    =IFERROR(INDEX(Table!$A$2:$B$6,MATCH(List!$A2,Table!$C$2:$C$6,0),MATCH(List!B$1,Table!$A$1:$B$1,0)),"")

  24. #24
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: VLOOKUP between two sheets including entire row

    Please Login or Register  to view this content.
    It works by me, see the attached file.

  25. #25
    Registered User
    Join Date
    06-27-2014
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: VLOOKUP between two sheets including entire row

    @FDibbins

    So if I have 7000 rows in the table should I change where both of the 6's in the formula to be 7000?

  26. #26
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: VLOOKUP between two sheets including entire row

    Please Login or Register  to view this content.

  27. #27
    Registered User
    Join Date
    06-27-2014
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: VLOOKUP between two sheets including entire row

    This formula worked when I used it in the sample data but for some reason with the real data it is giving me #REF! In each cell

  28. #28
    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: VLOOKUP between two sheets including entire row

    Quote Originally Posted by samdahlr View Post
    @FDibbins

    So if I have 7000 rows in the table should I change where both of the 6's in the formula to be 7000?
    Yes, that is correct

    =IFERROR(INDEX(Table!$A$2:$B$7000,MATCH(List!$A2,Table!$C$2:$C$7000,0),MATCH(List!B$1,Table!$A$1:$B$1,0)),"")

  29. #29
    Registered User
    Join Date
    06-27-2014
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: VLOOKUP between two sheets including entire row

    Okay. Now my only problem is that when I copy and paste the formula to B2 it automatically pulls up a window for me to open a file. I am not sure why it is doing this?

  30. #30
    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: VLOOKUP between two sheets including entire row

    That is probably because the sheet names in the formula do not match your actual sheet names. Check that they are the same and adjust in the formula as needed

+ 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] Copy entire row to corresponding sheets based on vlookup
    By onbeillp111 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-19-2013, 01:50 PM
  2. Copy entire worksheet including all colors
    By Trevorrow in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-06-2013, 01:45 PM
  3. Copy entire worksheet to another including macro buttons
    By The Skipper in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-15-2012, 11:34 PM
  4. Copy entire sheet including Private Sub
    By Shifcane in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2011, 03:27 PM
  5. Copy entire worksheet including all Macros and VBA Code
    By alanda in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-22-2008, 04:03 PM

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