Excel To Count the number of days?

  David4637 16:25 20 Feb 2010
Locked

Please give me the syntax to provide the answer of 31 days in Column C?

Column A 01/03/10

Column B 31/03/10


Column C 31

Obviously I need to count the difference between odd dates, the above is to make it easy to understand what I require.
Thanks David

  VoG II 16:27 20 Feb 2010

Try

=B1-A1+1

Format the result cell as Number.

  MAJ 16:27 20 Feb 2010

The Datedif function. click here

  David4637 17:00 20 Feb 2010

Thanks both for a very fast reply. Tried VOGs - works fine, but will look at Maj as well.
Thanks again both David

  David4637 13:26 21 Feb 2010

MAJ - your link also works, without having to add an extra day to make 31 days.
Thanks again to you both. David

  MAJ 13:39 21 Feb 2010

Sorry David4637, Datedif gives the number of days/months/years between the dates, not the inclusive days.

  David4637 13:59 23 Feb 2010

Yes you are right I did have to add +1 to give me the inclusive days at start and end of the period. Thanks again. David

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Galaxy Note 8 vs iPhone X

Awful clip art from 1994 is being tweeted every hour by a bot

iPhone X vs Samsung Galaxy Note 8

Les meilleurs navigateurs internet 2017