Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-06-2016, 10:30 AM
bremen22 bremen22 is offline Getting an if to show output in hours Windows 7 64bit Getting an if to show output in hours Office 2010 64bit
Advanced Beginner
Getting an if to show output in hours
 
Join Date: Jul 2013
Posts: 44
bremen22 is on a distinguished road
Default Getting an if to show output in hours

Something pretty simple here...



I have a spreadsheet that shows how many man hours a task took to complete. If the task is still in work the cell that shows the hours is blank. I have a date time column in my sheet that shows when the "clock starts ticking".

My formula is

Code:
 =if(I2="", Now()-C2, I2)
I would like my result to be in the number of hours. For example. the value in C2 = 7/1/2016 11:42:36. If this is posted 7/6/2016 13:28:14 the formula returns 5.34...

I want to see 120 (number of hours in 5 days)
Reply With Quote
  #2  
Old 07-06-2016, 08:34 PM
xor xor is offline Getting an if to show output in hours Windows 10 Getting an if to show output in hours Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

You can get the exact number of hours, minutes and seconds by formatting the cell with your formula: [h]:mm:ss or just [h] if you only want number of hours.

If you want to round to hours for whole number of days you can change your formula to:

=if(I2="", INT(Now()-C2), I2)
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Record from output gregi OneNote 0 02-15-2016 01:04 AM
Getting an if to show output in hours Setting DPI for graphic output ChrisBrewster PowerPoint 11 02-11-2016 09:12 AM
Getting an if to show output in hours 30+ emtpy page output Delcasa Mail Merge 4 04-30-2015 10:26 PM
mail merge – output to .pdf eNGiNe Mail Merge 3 09-29-2013 11:45 PM
Output Presentation Settings yeapurvz10 PowerPoint 0 09-17-2010 10:30 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:40 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft