Counting between two given dates

Closed
Report
Posts
2
Registration date
Tuesday January 8, 2013
Status
Member
Last seen
January 9, 2013
-
Posts
2847
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
January 13, 2022
-
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
2847
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
January 13, 2022
491
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
0
Posts
2
Registration date
Tuesday January 8, 2013
Status
Member
Last seen
January 9, 2013

Hy TrowaD

I did that but it does not work. For exampler IF A1= 01/01/2013 and A2 = 01/02/2013. When I put A3: =A2-A1 the result is 31. But i need it to be 32 (to include the start and end date) . And the formula =A2-A1+1. i can not use cozo it will put 1 in the empty cells.
0
Posts
2847
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
January 13, 2022
491
Hi Christine,

Then you have to use brackets as in:
=(A2-A1)+1

Best regards,
Trowa
0
Posts
2847
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
January 13, 2022
491
Although =A2-A1+1 works for me as well.
0
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
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)
0

Hy Rizvisa1,

I do not know why it is not working . It gave me message that the formula contains errors.
I need help please :(.
0