# The Function Sum(IF(AND())) Statement is not calculating correctly

If my

[STARTDate] = 12/24/2020 AND [ENDDATE] =1/4/2021

It gives me a total of 3 days.

``````SUM(
(IF(AND(DATEVALUE("12/24/2020") >= [STARTDATE],DATEVALUE("12/24/2020") <= [ENDDATE]),1)) ,
(IF(AND(DATEVALUE("12/25/2020") >= [STARTDATE],DATEVALUE("12/25/2020") <= [ENDDATE]),1)) ,
(IF(AND(DATEVALUE("01/01/2021") >= [STARTDATE],DATEVALUE("01/01/2021") <= [ENDDATE]),1)) ,
(IF(AND(DATEVALUE("01/18/2021") >= [STARTDATE],DATEVALUE("01/18/2021") <= [ENDDATE]),1)) ,
(IF(AND(DATEVALUE("05/31/2021") >= [STARTDATE],DATEVALUE("05/31/2021") <= [ENDDATE]),1)) ,
(IF(AND(DATEVALUE("06/18/2021") >= [STARTDATE],DATEVALUE("06/18/2021") <= [ENDDATE]),1)) ,
(IF(AND(DATEVALUE("07/05/2021") >= [STARTDATE],DATEVALUE("07/05/2021") <= [ENDDATE]),1)) ,
(IF(AND(DATEVALUE("09/06/2021") >= [STARTDATE],DATEVALUE("09/06/2021") <= [ENDDATE]),1)) ,
(IF(AND(DATEVALUE("11/25/2021") >= [STARTDATE],DATEVALUE("11/25/2021") <= [ENDDATE]),1)) ,
(IF(AND(DATEVALUE("11/26/2021") >= [STARTDATE],DATEVALUE("11/26/2021") <= [ENDDATE]),1)) ,
(IF(AND(DATEVALUE("12/24/2021") >= [STARTDATE],DATEVALUE("12/24/2021") <= [ENDDATE]),1)) ,
(IF(AND(DATEVALUE("12/27/2021") >= [STARTDATE],DATEVALUE("12/27/2021") <= [ENDDATE]),1)) ,
(IF(AND(DATEVALUE("01/01/2022") >= [STARTDATE],DATEVALUE("01/01/2022") <= [ENDDATE]),1)) ,
(IF(AND(DATEVALUE("01/17/2022") >= [STARTDATE],DATEVALUE("01/17/2022") <= [ENDDATE]),1))
)
``````