Forum Discussion

Jose Alas-Ruiz's avatar
Jose Alas-Ruiz
Copper Contributor
Mar 06, 2018

How to setup an IF function to determine Delivery date is GOOD/NO GOOD

I want to use the IF function to determine if the "delivery date" on cell "B" surpassed the "ship date" on cell "A" by say 1 day, then it's Good, if not, then it's No Good.  In some instances, the delivery date could also be 2 days, e.g., two-day shipment.  This is where I'm getting stuck, how can I tell the excel formula if cell "B" is greater than cell "A" by one day, then Good, if not, No Good. 

3 Replies

  • Haytham Amairah's avatar
    Haytham Amairah
    Silver Contributor

    Jose,

     

    You can do it by this simple algorithm:

    • Subtract the Delivery Date from Ship Date.
    • Check if the subtraction value is greater than 1 using this comparative operator ">".
    • Use the above logical test in IF function to return NO GOOD if the logical test is TRUE, and GOOD if the logical test is FALSE.
    You can translate the above in this formula:
    =IF(B2-A2>1,"No Good","Good")
     
    Please find the attached file.
    • Sima5's avatar
      Sima5
      Copper Contributor

      Haytham Amairah I have a question, how would you modify this formula if you have multiple carriers in one workbook? I have 4 different carriers all lumped into one workbook but what to find the percentages for each.

    • Jose Alas-Ruiz's avatar
      Jose Alas-Ruiz
      Copper Contributor

      Hi Haytham,

       

      Thanks so much for the quick response.  It worked beautifully.  

       

      Jose,

Resources