+ Reply to Thread
Results 1 to 8 of 8

Lookup Function Search 2 columns pull date from 3rd

  1. #1
    Registered User
    Join Date
    06-29-2011
    Location
    united states
    MS-Off Ver
    Excel 2003
    Posts
    4

    Lookup Function Search 2 columns pull date from 3rd

    Hello, I am having the hardest time figuring this one out in excel can someone please help me out. I have three columns two with duplicate sorting information and the third the actual content I want. What function will enable me to pull the third column based off of the first two. See example attached. Thank you! Let me know if you have more questions about my issue.
    Attached Files Attached Files
    Last edited by dwyngard; 06-30-2011 at 12:57 PM.

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

    Re: Help: Lookup Function Search 2 columns pull date from 3rd

    You'll need to insert a column in your lookup table and enter this formula dragged down

    =A1&B1

    Then whereever you are looking things up (in my example the Lookup sheet)

    =VLOOKUP(A2&B2,Table!$C$1:$D$5,2,FALSE)
    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

  3. #3
    Registered User
    Join Date
    06-29-2011
    Location
    united states
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Help: Lookup Function Search 2 columns pull date from 3rd

    Yes that is exactly what I needed. Thank you! I did have one other issue through that you may know the answer to. When there is a result that comes back false it says #N/A, how can I make it come back $0. Thank you.

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Help: Lookup Function Search 2 columns pull date from 3rd

    Wrap the VLOOKUP formula in an IFERROR (Excel 2007) or IF(ISNA()) function, for example:

    =IF(ISNA(VLOOKUP(A2&B2,Table!$C$1:$D$5,2,FALSE)),0,VLOOKUP(A2&B2,Table!$C$1:$D$5,2,FALSE))

    or

    =IFERROR(VLOOKUP(A2&B2,Table!$C$1:$D$5,2,FALSE),0)

  5. #5
    Registered User
    Join Date
    06-29-2011
    Location
    united states
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Lookup Function Search 2 columns pull date from 3rd

    Great thanks I used the IFERROR and it worked great!

    How do I mark this thread as solved?
    Last edited by dwyngard; 06-30-2011 at 09:09 AM.

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

    Re: Lookup Function Search 2 columns pull date from 3rd

    Go to your first post, click on the edit button > go advanced and change the prefix. Glad we could help.

  7. #7
    Registered User
    Join Date
    06-29-2011
    Location
    united states
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Lookup Function Search 2 columns pull date from 3rd

    I actually ran into one more question. Thanks guys for helping me out this has been amazing. What I need to figure out is if there is duplicate information as displayed in the example, how do I SUM them in the VLOOUP formula.
    Attached Files Attached Files

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

    Re: Lookup Function Search 2 columns pull date from 3rd

    You're going to have to move to SUMPRODUCT. Try this formula

    =SUMPRODUCT(--(Table!$A$1:$A$6=A2),--(Table!$B$1:$B$6=B2),Table!$D$1:$D$6)

    Here's a link to learn a little more about SUMPRODUCT
    http://www.contextures.com/xlFunctio...tml#SumProduct

    Does that work for you?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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