+ Reply to Thread
Results 1 to 12 of 12

VLOOKUP and IF Statements combined

Hybrid View

  1. #1
    Registered User
    Join Date
    04-05-2013
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    14

    VLOOKUP and IF Statements combined

    Hello,

    I need to create a vlookup formula but only return the value when a specific condition is met.

    in column I on the "Costs& Allowances" tab I need to vlookup based on column B on tab "120913" and only return the value when columns B and C are different on tab 120913.

    I tried this formula and it is not working.

    =IF('120913'!J11<>'120913'!I11,(IFERROR(VLOOKUP(B7,'120913'!C:AB,8,0),"")),"")

    Any help would be appreciated.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    04-05-2013
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: VLOOKUP and IF Statements combined

    Need to return value in column C from "120913" only when it is different than column B.

  3. #3
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,102

    Re: VLOOKUP and IF Statements combined

    I don't know how to get sheet "120913" to show all, but one question for you.

    What happen if there's multiple/duplicates Product #?

    Which one are you going to take?

    Reason being, vlookup only takes the 1st instance when it found.

  4. #4
    Registered User
    Join Date
    04-05-2013
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: VLOOKUP and IF Statements combined

    If there are duplicate product#'s they should all have the same values in columns B and C

  5. #5
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,102

    Re: VLOOKUP and IF Statements combined

    If that's the case, try this formula

    =IF(VLOOKUP($B4,'120913'!$A:$C,2,0)<>VLOOKUP($B4,'120913'!$A:$C,3,0), VLOOKUP($B4,'120913'!$A:$C,3,0), "Same")

  6. #6
    Registered User
    Join Date
    04-05-2013
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: VLOOKUP and IF Statements combined

    coming up #NAME?, I'm double checking the formula but I believe I wrote it exactly as you had it.

  7. #7
    Registered User
    Join Date
    04-05-2013
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: VLOOKUP and IF Statements combined

    I see that one and they should have the same values. I will correct that later. thank you by the way.

  8. #8
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,102

    Re: VLOOKUP and IF Statements combined

    A good example of Product number is 68256

  9. #9
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,102

    Re: VLOOKUP and IF Statements combined

    But that's what I meant, if there's duplicate Porduct #, and that the values in column B and C are different. Which one do you take? What do you look at to decide which one to take.

    e.g. Product # 68256

  10. #10
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,102

    Re: VLOOKUP and IF Statements combined

    Copy and paste the formula that I gave you on cell I4 of the "Cost&Allowances" sheet. Please use the file that you've attached to see if the formula works

  11. #11
    Registered User
    Join Date
    04-05-2013
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: VLOOKUP and IF Statements combined

    That worked. Thank you very much!

  12. #12
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,102

    Re: VLOOKUP and IF Statements combined

    Glad that I could help. Remember to mark this thread as solved =)

+ 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] IF combined with VLOOKUP
    By dave9860E in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-03-2013, 12:58 AM
  2. combined (nested?) IF statements
    By tjl in forum Excel General
    Replies: 1
    Last Post: 06-27-2012, 01:14 PM
  3. Revenue allocation using combined/Nested IF statements
    By Irfan123 in forum Excel General
    Replies: 9
    Last Post: 07-28-2008, 09:29 AM
  4. Add multiple IF statements to a combined string of cells
    By littledobby in forum Excel General
    Replies: 1
    Last Post: 07-17-2008, 11:31 PM
  5. average, min, max combined with if statements
    By kevmac27 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-29-2008, 06:04 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