I am tasked with making a spread sheet showing the years, months, and days until a specific date. and then if its past due show the same but as a negative or some value to show it is past due.
what i am using now is:
=IF(DATEDIF(S4,N4,"y")=0,"",IF(DATEDIF(S4,N4,"y")=1,DATEDIF(S4,N4,"y")&"year",DATEDIF(S4,N4,"y")&"years"))&IF(AND(DATEDIF(S4,N4,"y")<>0,DATEDIF(S4,N4,"ym")<>0),", ","")&IF(DATEDIF(S4,N4,"ym")=0,"",IF(DATEDIF(S4,N4,"ym")=1,DATEDIF(S4,N4,"ym")&"month",DATEDIF(S4,N4,"ym")&" months"))&IF(AND(OR(DATEDIF(S4,N4,"y")<>0,DATEDIF(S4,N4,"ym")<>0),DATEDIF(S4,N4,"md")<>0),", ","")&IF(DATEDIF(S4,N4,"md")=0,"",IF(DATEDIF(S4,N4,"md")=1,DATEDIF(S4,N4,"md")&" day",DATEDIF(S4,N4,"md")&" days"))
N4 is the objects due date and s4 is todays date. the problem I am having is when something is past due as in n4 is in the past. I am getting a number error. is there a way to eight get the years monts and days as a negative or some other value to show its in the past while still showing the time until one is due. Ive been racking my brain for a while now and im lost. thank you all
Bookmarks