A dataset from the production of textiles is shown in the picture below. We’ll add 8 hours to the order time to get the Delivery time.
Method 1 – Divide Hour Value by 24 and Add It
Steps:
- Choose a blank cell, such as F5, and insert the following formula into the formula bar, then press the Enter key.
=D5+E5/24
- Drag down the fill handle.
- This is the final table.
Method 2 – Use the TIME Function to Add 8 Hours
Steps:
- Go to cell E5 and apply the following formula.
=D5+TIME(8,0,0)
- Hit the Enter key.
- Drag down the fill handle for the series.
Method 3 – Apply the TIMEVALUE Function
Steps:
- Use the following formula in E5.
=D5+TIMEVALUE("8:0:0")
- Hit Enter and drag down the fill handle.
Method 4 – Apply VBA Code
Steps:
- Press Alt + F11, and a VBA window will appear.
- Navigate to the Insert Tab and open a new Module.
- Insert the following code in the module window:
Function Add_8Hours(val As String, p As Integer) As String
Dim Xdate As Date
Xdate = CDate(val)
Xdate = DateAdd("h", p, Xdate)
Add_8Hours = Format(Xdate, "m/d/yy hh:mm AM/PM")
End Function
This code will generate the function Add_8Hours. Cdate will convert the supplied value to a date DateAdd will add the hour value to the date. We’ll give this date-time the format we want.
- Save the file.
- Enter the manual function named Add_8Hours in F5.
- Hit Enter and AutoFill down.
Read More: How to Add Time to Date in Excel
How to Add 30 Minutes or Over 24 Hours to 8 Hours of Time in Excel
Adding 30 Minutes:
Enter the formula =B4+C4/1440
into the formula bar. 1 hour= 60 mins, 1 day= 24 hours, which adds to 24*60=1440.
Adding More Than 24 Hours:
Enter the formula =B4+C4/24 into the formula bar. 1 day has 24 hours.
Download the Practice Workbook
Related Articles
- How to Add Minutes and Seconds in Excel
- Add Milliseconds to Time in Excel
- How to Add Minutes to Time in Excel
- How to Add Hours to Time in Excel
- How to Add Hours and Minutes in Excel
- How to Add 1 Hour to Time in Excel
- Add 15 Minutes to Time in Excel
- How to Add Hours, Minutes, and Seconds in Excel
<< Go Back to Add Time in Excel | Calculate Time | Date-Time in Excel | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!