View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Working With Dates in Excel

Add 1

=B1-A1+1

Its worth reading this section on how excel stores the dates..by Chip Pearson
http://www.cpearson.com/excel/datetime.htm

--
Jacob (MVP - Excel)


"Working With Dates in Excel" wrote:

Hello:

I noticed that when I subtract one date from another in Excel it treats them
as integers. For example if I subtract 10-1 in Excel it = 9. With the dates
if I subtract 1/31/2010 - 1/1/2010 it will = 30 in Excel because Excel see
that is 31-1=30.

If I am using Excel as a log to keep up with what I doing for example I
started this project on 1/1/2010 and the final day I worked on the project
was on 2/16/2010. So to keep up with what I am doing I entered 1/1/2010 on an
Excel worksheet at the beginning of the first day then at the end of the last
day I enter I entered 2/16/2010. In this example its pretty easy to see that
I worked 47 days on this project but lets say I had starts and stops working
on other things intermittently and the project ran months not starting or
stopping on nice even days and I wanted to subtract dates as I have them
entered in my workbook to give me a running total of days I have worked on
the project what would happen is every time I subtracted on date from another
Excel would short me one day. If I didn't know this my information could
short change me or bring my creditability into question. Is there way to do
what I am trying to do that I do not know about?