Time Calculations

cnaylon

New Member
Joined
Feb 6, 2008
Messages
44
Hi,

I know Excel has issues when using Time. I am trying to determine if a job that was performed by one of my people was performed before or after a certain time so I can pay them for 'After Hours' work.

Here's the formula I'm using: =IF(OR(C9<0800,C9>2100),"After Hours"," "). Cell C9 contains values like: 9:15:00 AM.

If I use this formula, Excel doesn't seem to recognize the time in C9 at all and either makes all the calculations equal "After Hours", or " " depending on what evaluator I use (< or >). If I change the "0800" and "2100" in the formula to "08:00", "21:00", Excel errors out. As if it doesn't recognize the values.

Any thoughts?

Thank You,
Craig
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Basically, "08:00" is a text value. Adding 0 to it coerces it to a number that Excel recognises as a time.
 
Upvote 0

Forum statistics

Threads
1,224,604
Messages
6,179,857
Members
452,948
Latest member
UsmanAli786

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