Forum Discussion
If today's date is greater than a certain date by a number of days
- Jun 20, 2023
In another cell:
=IF(A6=TODAY()-4, "The date in A6 is four days ago!", "")
or perhaps
=IF(AND(A6<>"", A6<=TODAY()-4), "The date in A6 is four or more days ago", "")
Let's look at column D.
You check for D2<=TODAY()-4, i.e. D2 is 4 or more days before today.
You also check for D2=TODAY(), i.e. D2 is today's date.
If neither is satisfied, the formula continues to the last bit that returns either "task is not due" or "in progress". This will happen if D2 is in the future, but also if D2 is 1, 2 or 3 days before today.
What do you want to happen if D2 is 1, 2 or 3 days before today?
- HansVogelaarJun 21, 2023MVP
Try this:
=IF(COUNTIF(D3:D19,"=")=0,"You completed the tasks",IF(AND(D2<>"",D2<=TODAY()-4),"Delay in monitoring tasks",IF(AND(D2<>"",D2<=TODAY()-1),"You didn't complete the tasks",IF(D2=TODAY(),IF(COUNTIF(D3:D6,"<>")+COUNTIF(D8,"<>")+COUNTIF(D10,"<>")+COUNTIF(D12,"<>")+COUNTIF(D14,"<>")+COUNTIF(D16:D19,"<>")=0,"You did not complete the tasks","in progress"),IF(COUNTIF(D3:D6,"<>")+COUNTIF(D8,"<>")+COUNTIF(D10,"<>")+COUNTIF(D12,"<>")+COUNTIF(D14,"<>")+COUNTIF(D16:D19,"<>")=0,"task is not due","in progress")))))
- SaudJun 21, 2023Brass Contributor
The function did not work like this. After many attempts, I was able to reach the required result with the following equation:
=IF(COUNTIF(D3:D19;"=")=0;"You completed the tasks";IF(D2<=TODAY()-4;"Delay in monitoring tasks";IF(AND(D2<=TODAY()-1);IF(COUNTIF(D3:D6;"<>")+COUNTIF(D8;"<>")+COUNTIF(D10;"<>")+COUNTIF(D12;"<>")+COUNTIF(D14;"<>")+COUNTIF(D16:D19;"<>")=0;"You did not complete the tasks";"in progress");IF(AND(D2>=TODAY()-1);IF(COUNTIF(D3:D6;"<>")+COUNTIF(D8;"<>")+COUNTIF(D10;"<>")+COUNTIF(D12;"<>")+COUNTIF(D14;"<>")+COUNTIF(D16:D19;"<>")=0;"task is not due";"in progress")))))
Thank you very much for your time that you gave me, you inspired me to reach the result, Thank you again