# Floor and Ceiling problem

#### pgc01

##### MrExcel MVP
Hi brettr87

Try:

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

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

Copy down

#### xld

##### Banned
Try

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

and

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

#### sanrv1f

##### MrExcel MVP
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
Range(s)Formula
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),"")

#### Scott Huish

##### MrExcel MVP
Similar idea to pgc01:

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

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

Copy down.

#### brettr87

##### New Member
Thank you everyone, working wonderfully.

1,082,278
Messages
5,364,202
Members
400,786
Latest member
ismi88

### This Week's Hot Topics

• populate from drop list with multiple tables
Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
• Find list of words from sheet2 in sheet1 before a comma and extract text vba
Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
• Dynamic Formula entry - VBA code sought
Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...