Conditional formula

vinofino

New Member
Joined
May 16, 2011
Messages
1
I need to write a formula that will evaluate multiple OR's with numbers in a rime format with the two to the left of th ecolon open. I came up with this to start off which of course does not work.

=IF(E14>=xx:07 (OR(E14>=xx:22)),(OR(E14>=xx:37)),(OR(E14>=xx:52)))

objective is to round up to the next quarter hour if true and down if false.

Solution?
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Try:
=MROUND((D8 - INT(D8)) * 24,0.25) / 24

With the actual time in Cell D8 this will return the closest quarter-hour.

If yoiu want to retain any date values, try
=MROUND(D9, 0.25/24)

which is probably even easier, unless you are trying to discard dates - say to add times like on a timesheet
 
Last edited:
Upvote 0
I need to write a formula that will evaluate multiple OR's with numbers in a rime format with the two to the left of th ecolon open. I came up with this to start off which of course does not work.

=IF(E14>=xx:07 (OR(E14>=xx:22)),(OR(E14>=xx:37)),(OR(E14>=xx:52)))

objective is to round up to the next quarter hour if true and down if false.

Solution?
Try this...

Book1
AB
1TimeRounded
22:05 PM2:00 PM
312:27 AM12:30 AM
46:15 PM6:15 PM
52:25 AM2:30 AM
61:20 AM1:15 AM
72:49 AM2:45 AM
87:18 PM7:15 PM
95:47 AM5:45 AM
107:04 AM7:00 AM
Sheet2

Formula entered in B2 and copied down:

=ROUND(A2*96,0)/96
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,308
Members
452,904
Latest member
CodeMasterX

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