Forum Discussion
Jonathan Lollis
Apr 27, 2018Copper Contributor
Using Datedif within Countif
I'm trying to create a formula that will run a datedif to give a day count and then to compare that day count to a listing of dates for the purposes of calculating an estimated accrual of PTO for wor...
- May 02, 2018
Jonathan, was not able to load your second file as well.
As a comment, bit shorter variant of your formula is
=IF((Tenure!$H$8-$A2>=$U$2)*(Tenure!$H$8-$A2<=$V$2),$X$2*MAX($C2,80),…
Jonathan Lollis
May 02, 2018Copper Contributor
I was able to accomplish the necessary result by eliminating the countif function and using a regular if/then statement with the datedif function as my logical expression. Looks something like "=if(and(datedif($a2,Tenure!$H$8,"D")>=$U$2,datedif($a2,Tenure!$H$8,"D")<=$V$2),if$C2>80,80*$X$2,$C2*$X$2,..." and repeats throughout the whole of the chart.
SergeiBaklan
May 02, 2018MVP
Jonathan, was not able to load your second file as well.
As a comment, bit shorter variant of your formula is
=IF((Tenure!$H$8-$A2>=$U$2)*(Tenure!$H$8-$A2<=$V$2),$X$2*MAX($C2,80),…