+ Reply to Thread
Results 1 to 10 of 10

How to combine IF, VLOOKUP and MATCH?

  1. #1
    Registered User
    Join Date
    03-22-2010
    Location
    Manila
    MS-Off Ver
    Excel 2007
    Posts
    46

    How to combine IF, VLOOKUP and MATCH?

    How do you combine IF, LOOKUP and MATCH to come up with a formula in these conditions

    If A7 is equal in any rows in sheet 2 column A, B6 is equal to any rows in sheet 2 column B, and A3 is equal to any rows in C, then return the value of sheet 2 column D.


    Thanks!
    Last edited by stormracela; 05-25-2010 at 09:21 PM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: How to combine IF, VLOOKUP and MATCH?

    Can you post a workbook? I'm not sure I see where you want the result, and if you want to compare row by row.

  3. #3
    Registered User
    Join Date
    03-22-2010
    Location
    Manila
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: How to combine IF, VLOOKUP and MATCH?

    okay, I did a sample workbook.

    The blue lines are the ones that I want to populate value of Data Source column D.

    It has to satisfy conditions that A4, B4 and C3 matched with all data of columns A, B, C from Data source.

    Thanks!
    Attached Files Attached Files

  4. #4
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: How to combine IF, VLOOKUP and MATCH?

    try this in C4
    =SUMPRODUCT(($A4='Data Source'!$A$2:$A$40)*(LookUp!$B4='Data Source'!$B$2:$B$40)*(LookUp!C$3='Data Source'!$C$2:$C$40)*('Data Source'!$D$2:$D$40))

    Or this one

    =LOOKUP(99^99,CHOOSE({1,2},0,INDEX('Data Source'!$D$2:$D$40,MATCH($A4 & $B4 & C$3, 'Data Source'!$A$2:$A$40 & 'Data Source'!$B$2:$B$40 & 'Data Source'!$C$2:$C$40,0))))

    confirm as an array formulae (<Ctrl>+<Shift>+<Enter>)

    copy down then accross
    Last edited by contaminated; 05-17-2010 at 01:44 AM.
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  5. #5
    Registered User
    Join Date
    03-22-2010
    Location
    Manila
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: How to combine IF, VLOOKUP and MATCH?

    Why do we use sumproduct? I'm not actually adding the numbers, I just want to return it...

    Thanks

  6. #6
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: How to combine IF, VLOOKUP and MATCH?

    lol...... because SUMPRODUCT works in your case...
    Moreover, I think this one better then aboveposted

    =LOOKUP(99^99,CHOOSE({1,2},0,INDEX('Data Source'!$D$2:$D$40,MATCH(1,INDEX(($A4='Data Source'!$A$2:$A$40)*($B4='Data Source'!$B$2:$B$40)*(C$3='Data Source'!$C$2:$C$40),0),0))))

    confirmed just with enter
    Attached Files Attached Files
    Last edited by contaminated; 05-17-2010 at 02:14 AM.

  7. #7
    Registered User
    Join Date
    03-22-2010
    Location
    Manila
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: How to combine IF, VLOOKUP and MATCH?

    But why does the cells merge?

  8. #8
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: How to combine IF, VLOOKUP and MATCH?

    see attached if you ask why it works
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    03-22-2010
    Location
    Manila
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: How to combine IF, VLOOKUP and MATCH?

    okay, got it!

    Thanks a bunch!!!

  10. #10
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: How to combine IF, VLOOKUP and MATCH?

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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