# stop count at month end



## clintonaaronj (Dec 14, 2022)

I am not great with this so bear with me. I had a formula making a count based on a workload that would adapt throughout the month. at the end of the month this would then turn static, and the next month's count would start. it became corrupted somewhere along the lines, multiple users entering or not entering info, looking for help to repair. possible adage in that could build separate code for counting leavers in the month?
original code: =IF(TODAY()<(V$3,"-",COUNTIF(SIP!$A:$A,"CIS")-COUNTIFS(SIP!$A:$A,"CIS",SIP!$H:$H,">="&'(Do Not Amend) Attrition Stats'!V$3)+COUNTIFS(Leavers!$A:$A,"CIS",Leavers!$K:$K,">="&V$3)-COUNTIFS(Leavers!$A:$A,"CIS",Leavers!$H:$H,">="&V$3))
V3=month-year
H:H=date range start
Leavers!K:K=date range end


----------



## xlhelp15 (Dec 22, 2022)

Hi - You can solve it very easily by looking open and close parenthesis along with your conditions rule.


----------



## Sufiyan97 (Dec 23, 2022)

Hi & Welcome to MrExcel

Try:


```
=IF(TODAY()<V$3,"-",COUNTIF(SIP!$A:$A,"CIS")-COUNTIFS(SIP!$A:$A,"CIS",SIP!$H:$H,">="&'(Do Not Amend) Attrition Stats'!V$3)+COUNTIFS(Leavers!$A:$A,"CIS",Leavers!$K:$K,">="&V$3)-COUNTIFS(Leavers!$A:$A,"CIS",Leavers!$H:$H,">="&V$3))
```


----------

