Home » excel » excel – Mark row red if less than 5 occurrences per month

excel – Mark row red if less than 5 occurrences per month

Posted by: admin May 14, 2020 Leave a comment

Questions:

I was using a conditional formatting to mark the whole row blue if there is a “VISA” transaction in column E.

Would it be possible to set up a conditional formatting to mark the VISA transactions rows red if there is less than 5 of them in each month?
I can’t make the formula work it out automatically…

enter image description here

How to&Answers:

Select A:E, clear any existing CF from it, HOME > Styles – Conditional Formatting, New Rule…, Use a formula to determine which cells to format and Format values where this formula is true::

=AND($E1="VISA",COUNTIFS($E:$E,"VISA",$A:$A,">"&EOMONTH($A1,-1),$A:$A,"<"&EOMONTH($A1,0)+1)<5)

Format..., select red font, OK, OK.

Reinstate other CF to suit.