# How to Add Hours to Time in Excel: 8 Ways

### Method 1 – Add Hours to Time in Excel for Less than 24 Hours

Steps:
➤ Use the following formula in cell E5.

`=C5+D5`

C5 is the Entry Time, and D5 is the Time Period.

➤ Press ENTER and drag down the Fill Handle tool.

After adding up hours with the Entry Times we are getting the following Exit Times.

### Method 2 – Add Hours to Time in Excel for More than 24 Hours

Steps:
➤ Use the following formula in cell E5.

`=C5+D5`

C5 is the Entry Time, and D5 is the Time Period.

➤ Press ENTER and drag down the Fill Handle tool.

After adding up values, we are not getting our expected Exit Times because for equal to or more than 24 hours, Excel will consider 24 hours into a day and then show up only the remaining hours and minutes as results.

Select the Exit Times and go to Home Tab >> Number Format dialog box symbol.
Go there also by clicking CTRL+1.

Then the Format Cells dialog box will pop up.
➤ Go to Number Option >> Custom Option >> write [h]:mm in the Type box >> press OK.

Get our real added values for more than 24 hours.

### Method 3 – Add Hours to Time in Excel Using the TIME Function

Steps:
➤ Type the following formula in cell E5.

`=TIME(HOUR(C5)+D5,MINUTE(C5),SECOND(C5))`

C5 is the Entry Time, and D5 is the Time Period.

• HOUR(C5)+D5 → 11+9
Output → 20
• MINUTE(C5) → 30
• SECOND(C5) → 0
• TIME(HOUR(C5)+D5,MINUTE(C5),SECOND(C5)) → becomes
TIME(20,30,0)
Output → 20:30

➤ Press ENTER and drag down the Fill Handle tool.

We are getting the Exit Times after adding up the hours of the Time Periods with the Entry Times.

### Method 4 – Add Hours to Time in Excel for Negative Hours

Steps:
If we use the following formula like the previous method, we will have #NUM! error due to the negative results, as time can’t be negative.

`=TIME(HOUR(C5)+D5,MINUTE(C5),SECOND(C5))`

Solve this problem by using the following formula

`=TIME(IF(HOUR(C5)+D5<0,24+HOUR(C5)+D5,HOUR(C5)+D5),MINUTE(C5),SECOND(C5))`

C5 is the Entry Time, and D5 is the Time Period.

• HOUR(C5)+D5<0 → 11-9<0 → 2<0
Output → FALSE
• IF(FALSE,24+HOUR(C5)+D5, HOUR(C5)+D5) → as it is FALSE so it will execute the 3rd argument
Output → 2
• TIME(IF(HOUR(C5)+D5<0,24+HOUR(C5)+D5,HOUR(C5)+D5),MINUTE(C5),SECOND(C5)) → TIME(2,30,0)
Output → 2:30

➤ Press ENTER and drag down the Fill Handle tool.

Instead of getting the #NUM! error, we are adding up to 24 to those negative values.

### Method 5 – Add Hours to Time in Excel for a List of Date Time

Steps:
If we use the following formula, then instead of adding hours, we will add the duration to the days,

`=C5+D5`

We can rectify that formula by dividing the hours of the Durations by 24 to convert the day into hours. (1 day = 24 hours)

`=C5+D5/24`

➤ Press ENTER and drag down the Fill Handle tool.

Add the hours to the Order Times to get the Delivery Times (m-d-yy h: mm AM/PM) now.

### Method 6 – Using the TIME Function to Add Hours to Date Time

Steps:
➤ Type the following formula in cell E5.

`=C5+TIME(D5,0,0)`

C5 is the Order Time, and D5 is the Duration. TIME will convert the duration into hours and then this hour will be added up with the Order Time.

➤ Press ENTER and drag down the Fill Handle tool.

We are getting the Delivery Times for the products.

### Method 7 – Combining TIME, MOD and INT Functions to Add Hours to Time

Steps:
➤ Type the following formula in cell E5.

=TIME(MOD(D5,24),0,0)+C5+INT(D5/24)

C5 is the Order Time, and D5 is the Duration.

• MOD(D5,24) MOD(15,24)
Output15
• TIME(MOD(D5,24),0,0) → TIME(15,0,0)
Output0.625
• INT(D5/24) INT(15/24) INT(0.625)
Output 0
• TIME(MOD(D5,24),0,0)+C5+INT(D5/24) becomes
TIME(0.625+43474.2708333+0)
Output1-9-19 9:30 PM

➤ Press ENTER and drag down the Fill Handle tool.

Get the Delivery Times for the products.

### Method 8 – Using a VBA Code to Add Hours to Time in Excel

Steps:
➤ Go to Developer Tab >> Visual Basic Option.

The Visual Basic Editor will open up.
Insert Tab >> Module Option.

A Module will be created.

➤ Write the following code

``````Function Houraddition(value As String, x As Integer) As String

Dim dt1 As Date
dt1 = CDate(value)
Houraddition = Format(dt1, "m/d/yy hh:mm AM/PM")

End Function``````

This code will create the function Houraddition, CDATE will convert the given value into a date and DATEADD will add the hour value to this date. Finally,  will give our desired format to this date-time.

Go back to the sheet and write the following formula in cell E5

`=Houraddition(C5,D5)`

C5 is the Order Time, D5 is the Duration, and Houraddition will add the Duration to the Order Date.

➤ Press ENTER and drag down the Fill Handle tool.

Get the Delivery Times for the products.

## Related Articles

<< Go Back to Add Time in Excel | Calculate Time | Date-Time in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Tanjima Hossain

TANJIMA HOSSAIN is a marine engineer who enjoys working with Excel and VBA programming. For her, programming is a handy, time-saving tool for managing data, files, and online tasks. She's skilled in Rhino3D, Maxsurf C++, MS Office, AutoCAD, and Excel & VBA, going beyond the basics. She holds a B.Sc. in Naval Architecture & Marine Engineering from BUET and is now a content developer. In this role, she creates tech-focused content centred around Excel and VBA. Apart from... Read Full Bio

We will be happy to hear your thoughts

Advanced Excel Exercises with Solutions PDF