Forum Discussion
Ayman Abid
Jun 02, 2018Copper Contributor
Formula to count cells with conditional formatting
Hi there, I created a calendar in excel where periods of dates are highlighted with a formula in conditional formatting. Are we able to count the dates highlighted using say a countif or sumif fo...
- Jun 02, 2018
I'd suggest to simplify a bit condutional formatting rule and use formula for it like
=COUNTIFS($AA$6:$AA$277,"<="&B7,$AB$6:$AB$277,">="&B7)
To count the nubmer of highlighted days
=SUMPRODUCT(($AB$6:$AB$277-$AA$6:$AA$277+1)*ISBLANK($AB$6:$AB$277)*ISBLANK($AA$6:$AA$277))
Please see attached
SergeiBaklan
Jun 02, 2018Diamond Contributor
I'd suggest to simplify a bit condutional formatting rule and use formula for it like
=COUNTIFS($AA$6:$AA$277,"<="&B7,$AB$6:$AB$277,">="&B7)
To count the nubmer of highlighted days
=SUMPRODUCT(($AB$6:$AB$277-$AA$6:$AA$277+1)*ISBLANK($AB$6:$AB$277)*ISBLANK($AA$6:$AA$277))
Please see attached
- Ayman AbidJun 03, 2018Copper Contributor
Many thanks to both Arul and Sergei for your kind response to my inquiry. I really appreciate it :).
Sergei thank you for providing me with the formulas below that is exactly what i needed.
I wish you both the best.
Best regards,