Results 1 to 9 of 9

Thread: Help with multiple IF statements combined with maybe VLOOKUP???? PLEASE !!!!

  1. #1

    Question Help with multiple IF statements combined with maybe VLOOKUP???? PLEASE !!!!



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hello I am trying to do what should be a simple formula but for the life of me cannot figure it out.
    If Task Code = 280, take Task Code 280 completion date and minus Task Code 20 completion date (provided they have the same notification#). Hope this makes sense.

    Thanks for your help/
    Attached Files Attached Files

  2. #2
    Super Moderator NBVC's Avatar
    Join Date
    May 2011
    Location
    Mississauga, Canada
    Posts
    1,437
    Articles
    0
    Excel Version
    Excel 2016
    No, it doesn't really make too much sense. What is it you are really trying to achieve? Is task 280 and 20 the only two codes you are interested in?

    Perhaps repost your sample workbook showing manually entered desired results. Then explain why those are the results.


  3. #3

    IF Statements and VLOOKUP

    Quote Originally Posted by NBVC View Post
    No, it doesn't really make too much sense. What is it you are really trying to achieve? Is task 280 and 20 the only two codes you are interested in?

    Perhaps repost your sample workbook showing manually entered desired results. Then explain why those are the results.
    Here you go - does this help?Ezample here states 3 days. Looking for how long between tasks with the same notification #.
    Thanks for your help.
    Attached Files Attached Files

  4. #4
    Super Moderator NBVC's Avatar
    Join Date
    May 2011
    Location
    Mississauga, Canada
    Posts
    1,437
    Articles
    0
    Excel Version
    Excel 2016
    Still not entirely clear. Am I only looking at the difference between task 20 and task 280 for each notification? What is the result expected for notification # 20011025? Is it 3 also due to date difference between task 20 and 280?


  5. #5

    HELP IF statements with VLOOKUP

    Does this help? I have listed the desried results. I need to just foguire out the formula to achieve these results.
    Thank you again.
    Attached Files Attached Files

  6. #6
    Super Moderator NBVC's Avatar
    Join Date
    May 2011
    Location
    Mississauga, Canada
    Posts
    1,437
    Articles
    0
    Excel Version
    Excel 2016
    Ok. Try:

    =IF(B2=280,C2-SUMIFS($C$2:$C$20,$A$2:$A$20,A2,$B$2:$B$20,20),0)

    copied down


  7. #7
    YES !!!! That worked, I cannot thank you enough, thank you thank you and thank you a ton!!!

  8. #8

    Multiple IF and SUMIFS

    Thank you so much for the formula, it works beautifully.
    What can I add to this formula if the TaskCode "20" does not exist in the set of data. i.e. look at this file after I have inserted your formula. It has "41920" entry in there twice because I deleted some of the dates that did indeed have a Task Code of "20". What do I do in this instance, that I can add to the formula, so that it will just default to a "0" if Task Code of "20" does NOT exist for that notification#. I hope this makes sense, please see attached.
    Attached Files Attached Files

  9. #9
    Super Moderator NBVC's Avatar
    Join Date
    May 2011
    Location
    Mississauga, Canada
    Posts
    1,437
    Articles
    0
    Excel Version
    Excel 2016
    Try:

    =IF(B2=280,IF(COUNTIFS($A$2:$A$18,A2,$B$2:$B$18,20)>0,C2-SUMIFS($C$2:$C$18,$A$2:$A$18,A2,$B$2:$B$18,20),0),0)

    or

    =IF(AND(B2=280,COUNTIFS($A$2:$A$18,A2,$B$2:$B$18,20)>0),C2-SUMIFS($C$2:$C$18,$A$2:$A$18,A2,$B$2:$B$18,20),0)


Posting Permissions

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