Search code examples
exceldatetimeformattingexcel-formulaworksheet-function

How to increment time by 2 hours 30 min


Cell A1 has value Sat 10/17/2015 3:46 PM. I want to add 2 hours 30 minutes to it so the value in cell B1 should be: Sat 10/17/2015 6:16 PM. I tried using this formula in B1:

=A1+TIME(2,30,0)

but it returns #VALUE!.

What do I need to do to achieve Sat 10/17/2015 6:16 PM?


Solution

  • Please try:

    =DATEVALUE(MID(A1,4,18))+TIMEVALUE(RIGHT(A1,8))+5/48  
    

    formatted as:

    ddd mm/dd/yyyy hh:mm AM/PM