Floor and Ceiling problem

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Hi brettr87

Try:

In C2: =IF(A2>0,FLOOR(B2,"0:15"))

In D2: =IF(A2>0,CEILING(B2,"0:15"))

Copy down
 
Upvote 0
Try

=IF(A2>0,ROUNDDOWN(B2*96,0)/96,"")

and

=IF(A2>0,ROUNDUP(B2*96,0)/96,"")
 
Upvote 0
may be this
Excel Workbook
ABCD
1OriginalFloorCeiling
236.1614:56:0614:45:0015:00:00
336.1814:57:0414:45:0015:00:00
436.18514:59:0314:45:0015:00:00
536.1815:00:0815:00:0015:15:00
636.21515:01:1515:00:0015:15:00
736.21515:01:1515:00:0015:15:00
Sheet3
Cell Formulas
RangeFormula
C2=IF(A2>0,TIME(HOUR(B2),FLOOR(MINUTE(B2),15),0),"")
D2=IF(A2>0,TIME(HOUR(B2),CEILING(MINUTE(B2)+SECOND(B2)/60,15),0),"")
 
Upvote 0
Similar idea to pgc01:

C2:
=IF($A2>0,FLOOR($B2,1/96),"")

D2:
=IF($A2>0,CEILING($B2,1/96),"")

Copy down.
 
Upvote 0

Forum statistics

Threads
1,214,782
Messages
6,121,532
Members
449,037
Latest member
tmmotairi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top