Count text with conditions until text changes, then reset 'counter' and continue on

ddander54

Board Regular
Joined
Oct 18, 2012
Messages
75
My tasks are these:
1) Count the number of id's open in RED status greater than 15 concurrent business days and can not be a greater than 2 id's in a given period
2) Count the number of id's open in YELLOW status greater than 20 concurrent business days and can not be a greater than 20 id's in a given period

My data is loaded into a pivot table daily (work day) as this:

ID | Date | Indicator |
123 | 1/11/2021 | Green |
123 | 1/12/2021 | Yellow |
123 | 1/13/2021 | Red |
456 | 1/11/2021 | Red |
456 | 1/12/2021 | Red |
789 | 1/11/2021 | Yellow |
789 | 1/12/2021 | Yellow |
789 | 1/12/2021 | Yellow |
789 | 1/14/2021 | Green |

The ID and Date Column will not have blanks, the Indicator column could have a blank or 'None'.

I have tried creating a counter column with COUNTIFS, but then a different combination of Red, Yellow, Green for a give id 'breaks' the count.

Any suggestions for a solution?

Thanks in advance,
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Forum statistics

Threads
1,143,620
Messages
5,719,784
Members
422,244
Latest member
AYSHANA

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top