Jaymond Flurrie
Well-known Member
- Joined
- Sep 22, 2008
- Messages
- 919
- Office Version
- 365
- Platform
- Windows
For a change I ask something simple:
I want a formula that returns for me the next quarter of an hour. So if the clock is now 4:29:29, I want the return value to be 4:30:00 and if the clock is 12:19:43, I want the return value to be 12:30:00. it doesn't matter which way it treats the exact moments (if time is 12:00:00, return either 12:00:00 or 12:15:00, doesn't matter).
My solution is this and it seems to work:
=ROUNDDOWN(MOD(NOW();1)*24;0)&":"&IF(MOD(MOD(NOW();1)*24;1)>0,75;1;IF(MOD(MOD(NOW();1)*24;1)>0,5;0,75;IF(MOD(MOD(NOW();1)*24;1)>0,25;0,5;0,25)))*60&":00"
but do you have something simpler? (I use semicolon as decimal separator instead of comma, so don't let that one fool you)
I want a formula that returns for me the next quarter of an hour. So if the clock is now 4:29:29, I want the return value to be 4:30:00 and if the clock is 12:19:43, I want the return value to be 12:30:00. it doesn't matter which way it treats the exact moments (if time is 12:00:00, return either 12:00:00 or 12:15:00, doesn't matter).
My solution is this and it seems to work:
=ROUNDDOWN(MOD(NOW();1)*24;0)&":"&IF(MOD(MOD(NOW();1)*24;1)>0,75;1;IF(MOD(MOD(NOW();1)*24;1)>0,5;0,75;IF(MOD(MOD(NOW();1)*24;1)>0,25;0,5;0,25)))*60&":00"
but do you have something simpler? (I use semicolon as decimal separator instead of comma, so don't let that one fool you)