S
Secret Squirrel
I'm trying to sum up the values in column K where the value in column X
equals 2021, 2022, 2023, & 2025. Am I doing it wrong?
=SUMPRODUCT(--(Main!$F$2:$F$5000>=DATE(YEAR(A14),MONTH(A14),DAY(A14))),--(Main!$F$2:$F$5000<=DATE(YEAR(B14),MONTH(B14),DAY(B14))),--(Main!$X$2:$X$5000="2021"),--(Main!$X$2:$X$5000="2022"),--(Main!$X$2:$X$5000="2023"),--(Main!$X$2:$X$5000="2025"),Main!$K$2:$K$5000)
equals 2021, 2022, 2023, & 2025. Am I doing it wrong?
=SUMPRODUCT(--(Main!$F$2:$F$5000>=DATE(YEAR(A14),MONTH(A14),DAY(A14))),--(Main!$F$2:$F$5000<=DATE(YEAR(B14),MONTH(B14),DAY(B14))),--(Main!$X$2:$X$5000="2021"),--(Main!$X$2:$X$5000="2022"),--(Main!$X$2:$X$5000="2023"),--(Main!$X$2:$X$5000="2025"),Main!$K$2:$K$5000)