what is the formula for rounding time up to 1/4 hr?

R

Rick Rothstein \(MVP - VB\)

The following formula will do what you asked...

=IF(MOD(A4,TIME(0,15,0))=0,A4,MROUND(A4+TIME(0,7,0),TIME(0,15,0)))

It requires the Analysis ToolPak Add-in to be selected in the Tools/Add-Ins
option on Excel's menu bar.

Rick
 
R

Rick Rothstein \(MVP - VB\)

Just occurred to me... if your time values can have seconds in them, then
use this formula instead,

=IF(MOD(A4,TIME(0,15,0))=0,A4,MROUND(A4+TIME(0,7,29),TIME(0,15,0)))

Rick
 
R

Rick Rothstein \(MVP - VB\)

And, of course, David's formula is far superior. You may want to use his
formula this way, though....

=CEILING(A1,TIME(0,15,0))

as it will be easier to modify the round-off time (for example, to next 30
minute increment) in the future.

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top