# Formula to count days and reset count

1. ## Formula to count days and reset count

Hi! I need some help with formula to count days of different Users ID like the example I have on column D and then reset the count if I have a value grater than zero on column C
Day count.xlsx
Thanks.  Register To Reply

2. ## Re: Formula to count days and reset count

What is the criteria to add days to the count?  Register To Reply

3. ## Re: Formula to count days and reset count

Hi! this is what I have so far, I have this formula =IF(B2=\$B1:B\$2,DATEDIF(\$A\$2,A2,"D"),0) on column E but is only counting on the first User ID 114662 but not for 111111, but is still I don't know how to reset the count if I have a value grater than zero on column C and start the count from where the reset count is.

Thanks.  Register To Reply

4. ## Re: Formula to count days and reset count

Bump

Thanks.  Register To Reply

5. ## Re: Formula to count days and reset count

The function above has tree arguments: the date range, User ID range and reset count range (in the specific row that you start the count). So paste the code into one module and the formula "=SpecialCount(A3,B3,C3)" in cell "E3". ``Please Login or Register  to view this content.``  Register To Reply

6. ## Re: Formula to count days and reset count

Hi! I pasted the code to a module and pasted the formula on E3 an E3 is showing #NAME?. I am doing something wrong.

2015-05-26 10-27-32_Day count (1).png  Register To Reply

7. ## Re: Formula to count days and reset count

Lets try the attached file.

Thanks  Register To Reply

8. ## Re: Formula to count days and reset count

Hi! Victor this is almost what i need but column E is not working right on some rows does not count the days or when there a one does not reset. Can you help me out with this?

Thanks!

Day count.xlsm  Register To Reply

9. ## Re: Formula to count days and reset count

Hello,

Ok, Error will occur when value should be "0". That is why i put one "IFERROR" formula.  Register To Reply