Results 1 to 7 of 7

IF STATEMENT COMBINED WITH VLOOKUP?

This is a discussion on IF STATEMENT COMBINED WITH VLOOKUP? within the Excel Questions forums, part of the Question Forums category; I am trying to evaluate a cell, and depending on what the value is, enter either a 0 or go ...

  1. #1
    New Member
    Join Date
    Oct 2002
    Location
    Schaumburg, IL
    Posts
    40

    Default IF STATEMENT COMBINED WITH VLOOKUP?

    I am trying to evaluate a cell, and depending on what the value is, enter either a 0 or go thru with the VLOOKUP.

    Here is the formula I am using in cell E4
    =IF($E$3,"Wg Missing",0)=VLOOKUP($B$2,FEB!$A$14:$CH$43,7)

    Add'l info: Cell E3 is doing an evaluation of it's own --
    =IF($B$2<>E$264,"Wg Missing","February")


    I keep getting error #VALUE so I know I'm not doing this right. I'd appreciate any ideas you all have. Thank you for your help.

  2. #2
    AJ
    AJ is offline
    Board Regular
    Join Date
    Mar 2002
    Location
    =ActiveCell.Address
    Posts
    478

    Default Re: IF STATEMENT COMBINED WITH VLOOKUP?

    Hiya,

    To do the formula as you've got it, try...
    =IF($E$3="Wg Missing",0,VLOOKUP($B$2,FEB!$A$14:$CH$43,7))

    Or, if you wanted to dispense with the additional formula that you've got in column E and do it in one go, try...

    =IF($B$2<>E$264,0,VLOOKUP($B$2,FEB!$A$14:$CH$43,7))

    Rgds
    AJ

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    England, UK.
    Posts
    526

    Default

    Depending on your table I suspect just a VLOOKUP would be required.

  4. #4
    Board Regular
    Join Date
    Feb 2002
    Location
    Calgary, Alberta Canada
    Posts
    2,451

    Default

    IF STATEMENT COMBINED WITH VLOOKUP?
    I am trying to evaluate a cell, and depending on what the value is, enter either a 0 or go thru with the VLOOKUP.

    Here is the formula I am using in cell E4
    =IF($E$3,"Wg Missing",0)=VLOOKUP($B$2,FEB!$A$14:$CH$43,7)

    Add'l info: Cell E3 is doing an evaluation of it's own --
    =IF($B$2<>E$264,"Wg Missing","February")


    I keep getting error #VALUE so I know I'm not doing this right. I'd appreciate any ideas you all have. Thank you for your help.
    ----

    =IF($E$3="Wg Missing",0,VLOOKUP($B$2,FEB!$A$14:$CH$43,7)

    Do you really need full width of A14:CH43?

  5. #5
    New Member
    Join Date
    Oct 2002
    Location
    Schaumburg, IL
    Posts
    40

    Default IF STATEMENT COMBINED WITH VLOOKUP

    Thank you so much for your help (and so quick, too!). It's perfect.

  6. #6
    New Member
    Join Date
    Apr 2012
    Location
    Los Angeles
    Posts
    2

    Default Re: IF STATEMENT COMBINED WITH VLOOKUP

    This was a huge help. Thank you. Follow up question. Can I control the formatting of the # (i.e. Dollars vs. a Percentage) that results from this formula?

    Here's my formula: =IF(K12="RevShare",VLOOKUP(J12,products!$P$7:$Q$8,2,FALSE),VLOOKUP(E12,products!$M$16:$N$31,2,FALSE))

    If RevShare is in K12, then a percent will appear in the cell where this formula is entered.

    But if not, then I would like to post a regular $ value, not a percentage.

    Is that possible?

    Thanks!!

  7. #7
    New Member
    Join Date
    Mar 2015
    Location
    Texas
    Posts
    5

    Default Re: IF STATEMENT COMBINED WITH VLOOKUP

    Hello,
    I am trying to create a nested If statement that also includes a vlookup function. Quick scenario: Table 1 contains two pieces of information that must be found in Table 2. Table 2 contains columns of data that need to populate as the final answer if both of the two pieces of information are found and a 0 (zero) if they are not. Below is my current formula.

    =IF(L2=$S$3,VLOOKUP(E2,$R$4:$X$32,2,0),IF(L2=$T$3,VLOOKUP(E2,$R$4:$X$32,3,0),IF(L2=$U$3,VLOOKUP(E2,$R$4:$X$32,4,0),IF(L2 =$V$3,VLOOKUP(E2,$R$4:$X$32,5,0),IF(L2=$W$3,VLOOKUP(E2,$R$4:$X$32,6,0),IF(L2=$X$3,VLOOKUP(E2,$R$4:$X$32,7,0)))))))

    Note: E2 and L2 are the two items from Table 1 and L2 must match one of 6 column headings along with E2 on Table 2. Whatever the "intersection" of these two items on Table 2 is, should populate as the answer, otherwise it should return a zero 0.

    I am getting a "False" instead of a "0" and the correct answer when E2 and L2 are found. Not sure how to replace the False with a 0

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com