ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Rounding Up To Nearest Minute (https://www.excelbanter.com/excel-discussion-misc-queries/129275-rounding-up-nearest-minute.html)

Fred Djinn Holstings

Rounding Up To Nearest Minute
 
How would I get the below formula to round up to the nearest minute?

=IF(F228<FALSE,(9.5+(MOD(F228,1)-MOD(E228,1))*24+(NETWORKDAYS(E228,F228)-2)*9.5)/24,"")

Thanks Much!
Fred

pinmaster

Rounding Up To Nearest Minute
 
Hi,

One way:

=CEILING((F228<FALSE,(9.5+(MOD(F228,1)-MOD(E228,1))*24+(NETWORKDAYS(E228,F228)-2)*9.5)/24,""),TIME(0,1,0))

HTH
Jean-Guy

"Fred "Djinn" Holstings" wrote:

How would I get the below formula to round up to the nearest minute?

=IF(F228<FALSE,(9.5+(MOD(F228,1)-MOD(E228,1))*24+(NETWORKDAYS(E228,F228)-2)*9.5)/24,"")

Thanks Much!
Fred


daddylonglegs

Rounding Up To Nearest Minute
 
Hello Fred,

Your formula can be simplified a little.....then you can add MROUND, i.e.

=IF(F2<FALSE,MROUND(MOD(F2,1)-MOD(E2,1)+(NETWORKDAYS(E2,F2)-1)*"9:30",1/1440),"")

"pinmaster" wrote:

Hi,

One way:

=CEILING((F228<FALSE,(9.5+(MOD(F228,1)-MOD(E228,1))*24+(NETWORKDAYS(E228,F228)-2)*9.5)/24,""),TIME(0,1,0))

HTH
Jean-Guy

"Fred "Djinn" Holstings" wrote:

How would I get the below formula to round up to the nearest minute?

=IF(F228<FALSE,(9.5+(MOD(F228,1)-MOD(E228,1))*24+(NETWORKDAYS(E228,F228)-2)*9.5)/24,"")

Thanks Much!
Fred


daddylonglegs

Rounding Up To Nearest Minute
 
....orif you want to roundup just replace MROUND with CEILING, i.e.

=IF(F2<FALSE,CEILING(MOD(F228,1)-MOD(E228,1)+(NETWORKDAYS(E228,F228)-1)*"9:30",1/1440),"")

"daddylonglegs" wrote:

Hello Fred,

Your formula can be simplified a little.....then you can add MROUND, i.e.

=IF(F2<FALSE,MROUND(MOD(F2,1)-MOD(E2,1)+(NETWORKDAYS(E2,F2)-1)*"9:30",1/1440),"")

"pinmaster" wrote:

Hi,

One way:

=CEILING((F228<FALSE,(9.5+(MOD(F228,1)-MOD(E228,1))*24+(NETWORKDAYS(E228,F228)-2)*9.5)/24,""),TIME(0,1,0))

HTH
Jean-Guy

"Fred "Djinn" Holstings" wrote:

How would I get the below formula to round up to the nearest minute?

=IF(F228<FALSE,(9.5+(MOD(F228,1)-MOD(E228,1))*24+(NETWORKDAYS(E228,F228)-2)*9.5)/24,"")

Thanks Much!
Fred



All times are GMT +1. The time now is 02:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com