change date based on time
Here's one suggestion. I don't know how you are separating the date and time,
but one way is this:
With the time in A2, in B2 =INT(A2) and format as a date; in C2 =MOD(A2,1) and
format as a time (or you could just use the formula =A2 in B2 and C2 and
format appropriately).
If cell A3 is to have the hour added, in cell A3, =A2+1/24 and copy the
formulas in B2 and C2 down 1 row.
Or, if you don't want to see the new time in A3, change the formulas in B3 and
C3 to
=INT(A2+1/24) and =MOD(A2+1/24, 1)
On Mon, 12 Dec 2005 23:03:18 -0600, kdp145
wrote:
i am pulling in a report which has a date and time of the entry in
Column A...for ex 12/12/05 11:52 PM.
I have another column (Column B) which pulls in the date from Column
A..so it would be 12/12/05.
Column C has the time...so it would be 11:52 PM.
But now I want to add an hour to the time...so 11:52 PM would become
12:52 AM.
This I can do, but since the day changed, I want to be able to change
the date from 12/12/05 to 12/13/05 in Column B.
So essentially in the original column, if the time is 11:00 PM (since I
will be adding a hour to make it 12:00 AM of next day) or later than I
want to add a day to Column B.
I tried an if statement, so if the time was 11:00 PM or later it would
add another day, but that only works for that day since Excel uses
serial numbers for date/time.
It probly is something simple, but I just cant figure it out.
|