Counting between two given dates [Closed]

Report
Posts
2
Registration date
Tuesday January 8, 2013
Status
Member
Last seen
January 9, 2013
-
Posts
2757
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
June 8, 2021
-
Hello,


I need help. I need to count on Excel 2007 between two dates including the start date and end date. But the DatedIF fdoes not work. and the formula = (A2 - A1 +1) is not working also as i need to have 0 if no days is used.

Please helpp
Thank youuu

1 reply

Posts
2757
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
June 8, 2021
462
Hi Christine,

I'm guessing you want to count days.

When to dates are entered =A2-A1 should work. You might have to change the format of the formula cell to number to display the right value.

Best regards,
Trowa
Posts
2757
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
June 8, 2021
462
Although =A2-A1+1 works for me as well.
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
767
from what i got, the issue is blank date. In that case requirement is 0 days.
try this

=IF(OR(A1="",a2=""), 0, a2-A1 + 1)

Hy Rizvisa1,

I do not know why it is not working . It gave me message that the formula contains errors.
I need help please :(.
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
767
@2709christine
I just copied and pasted and it works.
Again the formula is
=IF(OR(A1="",A2=""), 0, A2-A1 + 1)
Posts
2757
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
June 8, 2021
462
Ha I missed the blank date part.

What might be the problem is that you have to use ; instead of , as in:
=IF(OR(A1="";A2=""); 0; A2-A1 + 1)

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!