+ Reply to Thread
Results 1 to 19 of 19

Nest Lookup With If And Statements

Hybrid View

  1. #1
    Registered User
    Join Date
    01-13-2004
    Posts
    42

    Nest Lookup With If And Statements

    Hello,
    I have the formula below:
    =IF(OR(LEN(B2)=0,C2>0),"",IF(AND(VLOOKUP(A2,$A3:$D$99,4,FALSE)=D2,VLOOKUP(A2,A3:$D$99,3,FALSE)>0,B2>A2),"Possible",""))

    It should bring back the result "possible" when C2 is negative and D2 (name) matches other D cells while B2 (date) is greater than the A cell (date) for the corresponding matched d cell also the corresponding c cell is positive.
    But I think the formula is not incorporating b2> corresponding matched column a.



    Thanks!

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    so do you need another Vlookup? It is difficult to understand what you are after without a sample. Please post a sample zipped sheet and show expected results.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    01-13-2004
    Posts
    42
    Thanks, please see attached.

    I am not really sure what I need, could be a vlookup. Thanks again.
    Attached Files Attached Files

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Maybe =IF(OR(B3 <= A3, C3 > 0, VLOOKUP(A3, $A$4:$D$99,4,FALSE) <> D3, VLOOKUP(A3, $A$4:$D$99, 3, FALSE) <= 0), "", "Possible")

  5. #5
    Registered User
    Join Date
    01-13-2004
    Posts
    42
    hi Shg,

    I tried the formula suggested, but I noticed that when I delete rows 47 to 99, it still gives "possible", since b2 is greater than any of row 2 to 46, there should be no match. How will the formula change if B2 should be less than any column A date to get a match, I might have said it wrong earlier.
    Thanks again!
    Quote Originally Posted by shg
    Maybe =IF(OR(B3 <= A3, C3 > 0, VLOOKUP(A3, $A$4:$D$99,4,FALSE) <> D3, VLOOKUP(A3, $A$4:$D$99, 3, FALSE) <= 0), "", "Possible")

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    It's difficult to understand your logic....

    F2 should only be "possible" if b2 is greater than A for the matched d cell, i.e. the matched cell should be from rows 47 to 99.
    What does "if b2 is greater than A for the matched d cell" mean? Do you mean A2 or do you mean a cell within range A47 to A99 that matches date in A2?

    Please specify using cell references where a match occurs and what results we should see.

+ 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