Floor and Ceiling problem

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,752
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
Joined
Feb 8, 2003
Messages
5,378
Try

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

and

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

sanrv1f

MrExcel MVP
Joined
Jan 1, 2009
Messages
3,468
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
Joined
Mar 17, 2004
Messages
19,886
Similar idea to pgc01:

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

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

Copy down.
 

Forum statistics

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

Some videos you may like

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...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top