Forum Discussion

Leah Maderal's avatar
Leah Maderal
Copper Contributor
Jun 01, 2018

2 IF Conditions with DATEDIF forumula, returns number even if conditions aren't met

I am receiving chapters from authors, sending them to editors, and getting them back from editors.

 

Need to count the # of days a chapter has been with an editor, but not if the chapter has been returned. And under other conditions I want to return text.

 

I got that part to work (took me 2 hours) but trying to nest the conditions to return specific text has been a flop.

 

IF(AND(ISNUMBER(A2),ISNUMBER(B2),ISBLANK(C2)),DATEDIF(B2,TODAY(),"d"),"")

 

Thought? Advice?

 

 

 

Date ReceivedDate Sent on to editorDate Returned# Days PendingIF(AND(ISNUMBER(A2),ISNUMBER(B2),ISBLANK(C2)),DATEDIF(B2,TODAY(),"d"),"")
4/10/185/1/185/5/18 wish it would say say "complete"
5/10/18   wish it would say say "not to editor"
notes here, like they said it would be late    
4/10/185/1/18 31 
    wish it would say say "not in"
     
     
     
A - Date ReceivedB - Date Sent on to editorC - Date ReturnedReturn this: 
If A is blank or a note, not a numberand B is blank or a note, not a numberand C is blank or a note, not a numbernot in 
if A is a dateand B is blank or a note, not a numberand C is blank or a note, not a numbernot to editor 
if A is a dateand if B is a dateand C is blank or a note, not a numberDATEDIF of B from TODAY, in Days
if A is a dateand if B is a dateand if C is a datecompleted 

 

  • Hi Leah,

     

    Please try this formula:

    =IF(AND(ISNUMBER(C2),ISNUMBER(B2),ISNUMBER(A2)),"complete",
    IF(AND(ISNUMBER(A2),B2="",C2=""),"not to editor",
    IF(AND(A2="",B2="",C2=""),"not in",
    IF(AND(ISNUMBER(A2),ISNUMBER(B2)),DATEDIF(B2,TODAY(),"d"),""))))

     And find it in the attached file.

     

    Regards

  • Haytham Amairah's avatar
    Haytham Amairah
    Silver Contributor

    Hi Leah,

     

    Please try this formula:

    =IF(AND(ISNUMBER(C2),ISNUMBER(B2),ISNUMBER(A2)),"complete",
    IF(AND(ISNUMBER(A2),B2="",C2=""),"not to editor",
    IF(AND(A2="",B2="",C2=""),"not in",
    IF(AND(ISNUMBER(A2),ISNUMBER(B2)),DATEDIF(B2,TODAY(),"d"),""))))

     And find it in the attached file.

     

    Regards

    • Leah Maderal's avatar
      Leah Maderal
      Copper Contributor

      Thank you Haytham!

       

      Your solution works exactly like I hoped.  

       

       

Resources