Counting between two given dates

Closed
2709christine Posts 2 Registration date Tuesday 8 January 2013 Status Member Last seen 9 January 2013 - 8 Jan 2013 à 05:19
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 14 Jan 2013 à 10:13
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
Related:

1 response

TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 555
8 Jan 2013 à 11:35
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
2709christine Posts 2 Registration date Tuesday 8 January 2013 Status Member Last seen 9 January 2013
9 Jan 2013 à 00:30
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.
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 555
10 Jan 2013 à 10:16
Hi Christine,

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

Best regards,
Trowa
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 555
10 Jan 2013 à 10:18
Although =A2-A1+1 works for me as well.
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 766
10 Jan 2013 à 17:20
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)
2709christine
12 Jan 2013 à 04:10
Hy Rizvisa1,

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