ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formula (https://www.excelbanter.com/excel-worksheet-functions/166233-formula.html)

Mike

Formula
 
I am trying to create a timecard and I need to calculate overtime. I am
trying an if function. =if(i28,i2-8,i2+0) where i2 is total hours and I am
using j2for ot. Thank you.

PKK

Formula
 
Hi Mike,

Assuming you're putting that formula in the j2 cell for the OT you're trying
to calculate, then the formula should be:

=IF(I28,I2-8,0)

This will give you the OT hours if more than 8 hours are worked and 0 hours
if 8 or less hours will work.

"Mike" wrote:

I am trying to create a timecard and I need to calculate overtime. I am
trying an if function. =if(i28,i2-8,i2+0) where i2 is total hours and I am
using j2for ot. Thank you.


joeu2004

Formula
 
On Nov 15, 8:10 am, Mike wrote:
I am trying to create a timecard and I need to calculate overtime.
I am trying an if function. =if(i28,i2-8,i2+0) where i2 is total hours
and I am using j2 for ot.


If you are trying to compute I2-8 or zero for OT in J2, try:

=max(0, I2-8)

PS: OT is often not simpy the hours in excess of 8 hours in a day.
You might want to check the OT laws in your state.


All times are GMT +1. The time now is 05:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com