A: |
The simple way to add
dates and times is to simply add values of 1 for each day. For
example, if you have 1/1/2008 in cell A1, then you could say
=A1+60 in cell B1 to add roughly two months to that date. This
is good enough for most cases, and it works fine for weeks (adding 7
days). 
You can do the same thing with times
if you realize that an hour is 1/24th of a day. If you want to add 6
hours to a time (1/4 of a day) then you could say =A1+(1/4).
If you want to add 5 hours, just say =A1+(5/24).

Now you just have to format the cell
as a TIME and you get the right answer.

Now like I said, this is usually
good enough for most cases. But what about when you really need
to be exact? Well, you can use Excel's DATE and TIME functions for
more exact date arithmetic. For example. Let's say you need to add 2
months again. This time, however, the start date is 3/1/08. Adding
60 gives you the wrong date.

So now we need something a little
more advanced. Try using the DATE function: =DATE(YEAR(A1),
MONTH(A1)+2, DAY(A1))

That adds exactly 2 months to the
date in A1. You can do the same trick to add years or days. For
example, this will add 5 years, 6 months, and 10 days to the date in
A1: =DATE(YEAR(A1)+5, MONTH(A1)+6, DAY(A1))+10

Now adding TIME works just a little
bit differently. If you want to add 6 hours to a cell use the TIME
function like this: =A1+TIME(6,0,0)

Yes, the value comes up with a
strange 1/0/1900 20:00 at first, but if you just format the
cell as a TIME value, it's correct. The TIME function basically is
=TIME(hours, minutes, seconds). So if you want to add 2 hours, 15
minutes, 10 seconds, you would say: =A1+TIME(2,15,10).
I cover dates and time in much more
detail in my
Excel 232
tutorial. I'll also show you how to calculate the difference between
two dates or times, and teach you more about how dates and times are
stored internally inside Excel.
|