+ Reply to Thread
Results 1 to 5 of 5

If AND VLOOKUP

  1. #1
    John Moore
    Guest

    If AND VLOOKUP

    Hi guys, I am looking for a solution that will combine the IF, AND and
    VLOOKUP functions to the following problem. In cell A2 I have the word NORTH
    and in cell B2 I have the year 2005 ,,,, in cell C2 I want to have a VLOOKUP
    that will work depending on the info in cells A2 and B2 ,,,, e.g.
    =IF(AND(A2="NORTH",B2="2005",vlookup(A3,range,2,0)) .........or something
    similar , I can't get the formula to work properly ,,,,, any help ?

  2. #2
    paul
    Guest

    RE: If AND VLOOKUP

    =IF(AND(A2="North",B2=2005),VLOOKUP(A3,G3:H6,2,FALSE))
    worked for me.You dont say what the result is when you try.Make sure your
    cell conditions are are actually what you are testing for.Note i dont
    actually need quotes around 2005.
    -
    paul
    [email protected]
    remove nospam for email addy!



    "John Moore" wrote:

    > Hi guys, I am looking for a solution that will combine the IF, AND and
    > VLOOKUP functions to the following problem. In cell A2 I have the word NORTH
    > and in cell B2 I have the year 2005 ,,,, in cell C2 I want to have a VLOOKUP
    > that will work depending on the info in cells A2 and B2 ,,,, e.g.
    > =IF(AND(A2="NORTH",B2="2005",vlookup(A3,range,2,0)) .........or something
    > similar , I can't get the formula to work properly ,,,,, any help ?


  3. #3
    John Moore
    Guest

    RE: If AND VLOOKUP

    Hi Paul ,,, works fine ,,, thanks for the quick response ,,,

    "paul" wrote:

    > =IF(AND(A2="North",B2=2005),VLOOKUP(A3,G3:H6,2,FALSE))
    > worked for me.You dont say what the result is when you try.Make sure your
    > cell conditions are are actually what you are testing for.Note i dont
    > actually need quotes around 2005.
    > -
    > paul
    > [email protected]
    > remove nospam for email addy!
    >
    >
    >
    > "John Moore" wrote:
    >
    > > Hi guys, I am looking for a solution that will combine the IF, AND and
    > > VLOOKUP functions to the following problem. In cell A2 I have the word NORTH
    > > and in cell B2 I have the year 2005 ,,,, in cell C2 I want to have a VLOOKUP
    > > that will work depending on the info in cells A2 and B2 ,,,, e.g.
    > > =IF(AND(A2="NORTH",B2="2005",vlookup(A3,range,2,0)) .........or something
    > > similar , I can't get the formula to work properly ,,,,, any help ?


  4. #4
    John Moore
    Guest

    RE: If AND VLOOKUP

    Hi again ,,,, Could this be extended to cover multiple scenarios ,,,,, e.g.
    if A2 was South and B2 was 2006 ,,,,and could it also incorporate the
    IFISERROR function to return 0 in the event of an error ?

    "John Moore" wrote:

    > Hi Paul ,,, works fine ,,, thanks for the quick response ,,,
    >
    > "paul" wrote:
    >
    > > =IF(AND(A2="North",B2=2005),VLOOKUP(A3,G3:H6,2,FALSE))
    > > worked for me.You dont say what the result is when you try.Make sure your
    > > cell conditions are are actually what you are testing for.Note i dont
    > > actually need quotes around 2005.
    > > -
    > > paul
    > > [email protected]
    > > remove nospam for email addy!
    > >
    > >
    > >
    > > "John Moore" wrote:
    > >
    > > > Hi guys, I am looking for a solution that will combine the IF, AND and
    > > > VLOOKUP functions to the following problem. In cell A2 I have the word NORTH
    > > > and in cell B2 I have the year 2005 ,,,, in cell C2 I want to have a VLOOKUP
    > > > that will work depending on the info in cells A2 and B2 ,,,, e.g.
    > > > =IF(AND(A2="NORTH",B2="2005",vlookup(A3,range,2,0)) .........or something
    > > > similar , I can't get the formula to work properly ,,,,, any help ?


  5. #5
    paul
    Guest

    RE: If AND VLOOKUP

    within the limitations of 7 or 9 nested ifs yes.....
    if(and(a2="north",b2=2005)vlookup(a3,range,etc),vlookup(.....
    this would result in another lookup if anything other than north and 2005 in
    a2 and b2
    you could keep going with the nested ifs and you could use iserror to keep
    it tidy.
    if(iserror(vlookup.....if(and(a2="north",b2=2005)vlookup(a3,range,etc),if(and(a2="south",b2=2006), vlookup(a4,range.....)))

    --
    paul
    [email protected]
    remove nospam for email addy!



    "John Moore" wrote:

    > Hi again ,,,, Could this be extended to cover multiple scenarios ,,,,, e.g.
    > if A2 was South and B2 was 2006 ,,,,and could it also incorporate the
    > IFISERROR function to return 0 in the event of an error ?
    >
    > "John Moore" wrote:
    >
    > > Hi Paul ,,, works fine ,,, thanks for the quick response ,,,
    > >
    > > "paul" wrote:
    > >
    > > > =IF(AND(A2="North",B2=2005),VLOOKUP(A3,G3:H6,2,FALSE))
    > > > worked for me.You dont say what the result is when you try.Make sure your
    > > > cell conditions are are actually what you are testing for.Note i dont
    > > > actually need quotes around 2005.
    > > > -
    > > > paul
    > > > [email protected]
    > > > remove nospam for email addy!
    > > >
    > > >
    > > >
    > > > "John Moore" wrote:
    > > >
    > > > > Hi guys, I am looking for a solution that will combine the IF, AND and
    > > > > VLOOKUP functions to the following problem. In cell A2 I have the word NORTH
    > > > > and in cell B2 I have the year 2005 ,,,, in cell C2 I want to have a VLOOKUP
    > > > > that will work depending on the info in cells A2 and B2 ,,,, e.g.
    > > > > =IF(AND(A2="NORTH",B2="2005",vlookup(A3,range,2,0)) .........or something
    > > > > similar , I can't get the formula to work properly ,,,,, any help ?


+ 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