Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-26-2016, 04:56 AM
billreed7 billreed7 is offline Time Calc with rounding. Windows 10 Time Calc with rounding. Office 2010 64bit
Novice
Time Calc with rounding.
 
Join Date: Jun 2016
Posts: 3
billreed7 is on a distinguished road
Unhappy Time Calc with rounding.

I need help with a formula, I want to put a start time and finish time into two cells and the answer needs to be to the nearest 15 minutes. ie 08.05 would be 0800, 07.25 would be 07.30 etc..


I have managed to find this that does the basic bit but not the rounding out.

=IF(C1<B1,((C1-B1)*24)+24,(C1-B1)*24)

but I find to put time in I need to put colons in and I would prefer to just type 0730 and not 07:30,I thought the time format would allow that but all I get is strange numbers coming up.

any help greatly appreciated

Bill Reed
Reply With Quote
  #2  
Old 06-26-2016, 06:47 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Time Calc with rounding. Windows 7 64bit Time Calc with rounding. Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,920
Pecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond repute
Default

Long formula but here goes:
suppose start time is in A1 and end time in B1 entered in military time ( like 0730) then try

=ROUND(MOD(time(left(b1,2),right(b1,2),0)-time(left(a1,2),right(a1,2),0),1)*24/0.25,0)*0.25/24
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #3  
Old 06-26-2016, 07:12 AM
Kevin@Radstock Kevin@Radstock is offline Time Calc with rounding. Windows 10 Time Calc with rounding. Office 2016
Office 365
 
Join Date: Feb 2012
Posts: 94
Kevin@Radstock is on a distinguished road
Default

Hi

I take it that you want decimal time! Format B1 & C1 as text, you can then enter "0", ie 0715.

In D1: =MROUND(MOD((--REPLACE(C1,3,0,":"))-(REPLACE(B1,3,0,":")),1),"00:15")*24

and format the cell "General".

Or for proper time

=MROUND(MOD((--REPLACE(C1,3,0,":"))-(REPLACE(B1,3,0,":")),1),"00:15")

and format as time.

Kevin
Reply With Quote
  #4  
Old 06-26-2016, 01:37 PM
billreed7 billreed7 is offline Time Calc with rounding. Windows 10 Time Calc with rounding. Office 2010 64bit
Novice
Time Calc with rounding.
 
Join Date: Jun 2016
Posts: 3
billreed7 is on a distinguished road
Default Thanks Kevin

That works a treat, but how do you get the #Value! to disappear in the answer cell? when there is nothing in B1 and C1.

I am using

=MROUND(MOD((--REPLACE(C1,3,0,":"))-(REPLACE(B1,3,0,":")),1),"00:15")*24
Reply With Quote
  #5  
Old 06-26-2016, 01:59 PM
Kevin@Radstock Kevin@Radstock is offline Time Calc with rounding. Windows 10 Time Calc with rounding. Office 2016
Office 365
 
Join Date: Feb 2012
Posts: 94
Kevin@Radstock is on a distinguished road
Default

Hi

One way, wrap in IFERROR.

=IFERROR(MROUND(MOD((--REPLACE(C1,3,0,":"))-(REPLACE(B1,3,0,":")),1),"00:15")*24,"")

Kevin
Reply With Quote
  #6  
Old 07-03-2016, 06:43 PM
billreed7 billreed7 is offline Time Calc with rounding. Windows 10 Time Calc with rounding. Office 2010 64bit
Novice
Time Calc with rounding.
 
Join Date: Jun 2016
Posts: 3
billreed7 is on a distinguished road
Thumbs up Thanks All

Thanks for all your help on this have got it up and running now. thanks again. Billl
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Time Calc with rounding. Rounding Up or Down depending on Start & End time richardst Excel 4 06-21-2016 06:03 PM
Rounding to nearest 0.25 Guloluseus Excel 5 10-27-2015 11:28 PM
Time Calc with rounding. Trying to create a formula to calc if I add x new accounts, I will have to hire y tech/support ppl glen123 Excel 7 07-28-2014 07:29 AM
Time Calc with rounding. XML List of lists in Excel or Calc manofspider Excel 1 08-05-2011 09:03 AM
Creating an Auto-Calc'd Date? Today+7 Days? SoCalTelephone Word 0 10-06-2010 10:27 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:43 AM.


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