+ Reply to Thread
Results 1 to 19 of 19

Nest Lookup With If And Statements

Hybrid View

opeyemi1 Nest Lookup With If And... 02-13-2008, 04:54 PM
NBVC so do you need another... 02-13-2008, 05:24 PM
opeyemi1 Thanks, please see attached.... 02-13-2008, 06:26 PM
shg Maybe =IF(OR(B3 <= A3, C3 >... 02-13-2008, 06:57 PM
opeyemi1 hi Shg, I tried the... 02-13-2008, 07:59 PM
NBVC It's difficult to understand... 02-14-2008, 09:07 AM
opeyemi1 Thanks NBVC. I mean that... 02-14-2008, 09:11 AM
NBVC still a little... 02-14-2008, 09:23 AM
  1. #1
    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

  2. #2
    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")

  3. #3
    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")

  4. #4
    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.
    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.

  5. #5
    Registered User
    Join Date
    01-13-2004
    Posts
    42
    Thanks NBVC.

    I mean that the date in b2 should be less than the dates in the rest of column A i.e. A3 to A99. In the data I attached, that would mean there would could only be a match from rows 47 to 99.

    I appreciate it, thanks!
    Quote Originally Posted by NBVC
    It's difficult to understand your logic....



    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.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    still a little confused..

    does this do what you want?

    =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<MAX(A3:A99)),"Possible",""))

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

    Thumbs up

    Hi NBVC, that actually almost did the trick (it's matching the correct dates now) except that when I make all the quantity in cells c47 to c99 negative, it still gives "possible", it should only give possible when b2>any a3:99 cell and when the matching c3:c99 cell is positive.

    So for example in the data I attached if I delete all the row 48-99. a47's date is greater than b2, and d2 = d47 so there is a match. But when I change c47 to negative, there will no longer a match since C47 has to be positive. How do I change the formula to incorporate the fact that the match c3:c99 has to be positive for there to be a match.

    Also, can you explain the B2<Max(A3:A99), is there a way to say B2<any A3:a99 cell, don't know if this is necessary though.

    Thanks so much!

    Quote Originally Posted by NBVC
    still a little confused..

    does this do what you want?

    =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<MAX(A3:A99)),"Possible",""))
    Last edited by opeyemi1; 02-14-2008 at 10:31 AM.

+ 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