IF Function with time date

Closed
Ronnieboo - 5 Oct 2009 à 10:51
 Trowa - 9 Oct 2009 à 09:05
Hello,
I need to add hours to a time date based upon a severity code.

Example cell D2 has the severity code it if is less than 3 the cell will need to show the date/time in cell K2 as an additonal 2 hours 2009-07-31 1443 will need to be 2009-07-31 1643. If D2 is great than 3 it would need to add 6 hours 2009-07-31 1443 would need to be 2009-07-31 2043.

Any assistance is greatly apprecaited!
Related:

2 responses

Blocked Profile
6 Oct 2009 à 08:19
Dear Ronnieboo,

Please consider the following suggestion:

https://ccm.net/forum/affich-120460-using-excel-if-function-with-data-validation

Thanks.
I quess your problem is how to add a hour to a date.

If you have a date like 2009-07-31 1443 and use a formula to add 1 you notice that 1 day is added.
Which means 1 equals 1 day equals 24 hours.
To add 1 hour you will have to divide 1 by 24 (1/24).

I quess the rest is easy, if not let me know.

Best regards,
Trowa