Counting between two given dates

Closed
2709christine Posts 2 Registration date Tuesday January 8, 2013 Status Member Last seen January 9, 2013 - Jan 8, 2013 at 05:19 AM
TrowaD Posts 2900 Registration date Sunday September 12, 2010 Status Moderator Last seen September 12, 2022 - Jan 14, 2013 at 10:13 AM
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

TrowaD Posts 2900 Registration date Sunday September 12, 2010 Status Moderator Last seen September 12, 2022 523
Jan 8, 2013 at 11:35 AM
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
2709christine Posts 2 Registration date Tuesday January 8, 2013 Status Member Last seen January 9, 2013
Jan 9, 2013 at 12:30 AM
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
TrowaD Posts 2900 Registration date Sunday September 12, 2010 Status Moderator Last seen September 12, 2022 523
Jan 10, 2013 at 10:16 AM
Hi Christine,

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

Best regards,
Trowa
0
TrowaD Posts 2900 Registration date Sunday September 12, 2010 Status Moderator Last seen September 12, 2022 523
Jan 10, 2013 at 10:18 AM
Although =A2-A1+1 works for me as well.
0
rizvisa1 Posts 4479 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 768
Jan 10, 2013 at 05:20 PM
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
2709christine
Jan 12, 2013 at 04:10 AM
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