R rush2rajen Member Feb 5, 2015 #1 Hi Excel Gurus, I am unable to subtract time. Though the date differs and also the time differs it should show in one column how many hours had been taken to complete the task rather than showing 1 days and 5 hours for e.g Thanks Raaj Attachments tm.xls tm.xls 20 KB · Views: 4
Hi Excel Gurus, I am unable to subtract time. Though the date differs and also the time differs it should show in one column how many hours had been taken to complete the task rather than showing 1 days and 5 hours for e.g Thanks Raaj
Hui Excel Ninja Staff member Feb 5, 2015 #2 Change Cell E2: =(C2+D2)-(A2+B2) Format Cell E2 as [hh]:mm Copy E2 down
PaulF Active Member Feb 5, 2015 #3 Hours = ((End_Date+End_Time)-(Start_Date+Start_Time))*24 See attachment... Attachments HoursAnswer.xlsx HoursAnswer.xlsx 12.7 KB · Views: 1
Hui Excel Ninja Staff member Feb 5, 2015 #5 Both techniques work although they give the same answer in different formats Your answer is a number whereas mine is still a time I did answer your Indirect question in between
Both techniques work although they give the same answer in different formats Your answer is a number whereas mine is still a time I did answer your Indirect question in between
R rush2rajen Member Feb 5, 2015 #7 Thanks a lot Hui and thank you Paul. Hui, Just one more query How can I show 1 day 6 Hours and 20 mins in cell E2 Thanks Raaj
Thanks a lot Hui and thank you Paul. Hui, Just one more query How can I show 1 day 6 Hours and 20 mins in cell E2 Thanks Raaj
Hui Excel Ninja Staff member Feb 5, 2015 #8 In E2: Apply a Custom Number Format like: d "Day" h "Hrs" mm "Min" If the value is likely to be less than 1 day Then use a Custom Number Format of: [<1] h "Hrs" mm "Min"; d "Day" h "Hrs" mm "Min" Which will display both options neatly
In E2: Apply a Custom Number Format like: d "Day" h "Hrs" mm "Min" If the value is likely to be less than 1 day Then use a Custom Number Format of: [<1] h "Hrs" mm "Min"; d "Day" h "Hrs" mm "Min" Which will display both options neatly
PaulF Active Member Feb 5, 2015 #9 Then again... and custom format may be easier... What do I know... *shrug* ./bow Hui
PaulF Active Member Feb 5, 2015 #10 =CONCATENATE(INT(E2/24)," Days ",TEXT(ROUNDDOWN(E2-(INT(E2/24)*24),0),"##")," Hours ",(E2-(E2-(INT(E2/24)*24)))," Minutes") Attachments HoursAnswer2.xlsx HoursAnswer2.xlsx 13 KB · Views: 1
=CONCATENATE(INT(E2/24)," Days ",TEXT(ROUNDDOWN(E2-(INT(E2/24)*24),0),"##")," Hours ",(E2-(E2-(INT(E2/24)*24)))," Minutes")
Hui Excel Ninja Staff member Feb 5, 2015 #11 Don't stop Paul You'll learn more by at least attempting and then seeing others answers