ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how do i use > or = to in a formual for excel (https://www.excelbanter.com/excel-worksheet-functions/17444-how-do-i-use-%3E-%3D-formual-excel.html)

Fast Eddie

how do i use > or = to in a formual for excel
 
i am trying to take an employee's total hours in one cell and separate them
into regular and overtime hours, for use on the rest of the spreadsheet.
The formula for regular time looks like: =B28 and for the overtime I have
been trying to use: =B28+-40 This works fine for 40 hours or more. When the
employee works less than 40 however it returns a negative number which throws
off the rest of the information in the sheet. i think i need a way to use
=(B28 +-40) if or=0
does anyone have any ideas?
Thanks in advance!

Ragdyer

Try this:

=(B2840)*(B28-40)
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"Fast Eddie" <Fast wrote in message
...
i am trying to take an employee's total hours in one cell and separate

them
into regular and overtime hours, for use on the rest of the spreadsheet.
The formula for regular time looks like: =B28 and for the overtime I have
been trying to use: =B28+-40 This works fine for 40 hours or more. When

the
employee works less than 40 however it returns a negative number which

throws
off the rest of the information in the sheet. i think i need a way to use
=(B28 +-40) if or=0
does anyone have any ideas?
Thanks in advance!



Arvi Laanemets

Hi

What do you really have in B28? Total hours? Then I don't unerstand your
first formula at all!

Let's try it.

In B28 you have total hours. When the number of regular hours in week is 40
or less, then you calculate them as
=MIN(40,B28)
and overtime hours as
=MAX(0,B28-40)


Arvi Laanemets


"Fast Eddie" <Fast wrote in message
...
i am trying to take an employee's total hours in one cell and separate

them
into regular and overtime hours, for use on the rest of the spreadsheet.
The formula for regular time looks like: =B28 and for the overtime I have
been trying to use: =B28+-40 This works fine for 40 hours or more. When

the
employee works less than 40 however it returns a negative number which

throws
off the rest of the information in the sheet. i think i need a way to use
=(B28 +-40) if or=0
does anyone have any ideas?
Thanks in advance!




Fast Eddie

Arvi - Thank you for the help. Works great. I know just enough to be
dangerous, not enough to always be productive.

Fast Eddie

"Arvi Laanemets" wrote:

Hi

What do you really have in B28? Total hours? Then I don't unerstand your
first formula at all!

Let's try it.

In B28 you have total hours. When the number of regular hours in week is 40
or less, then you calculate them as
=MIN(40,B28)
and overtime hours as
=MAX(0,B28-40)


Arvi Laanemets


"Fast Eddie" <Fast wrote in message
...
i am trying to take an employee's total hours in one cell and separate

them
into regular and overtime hours, for use on the rest of the spreadsheet.
The formula for regular time looks like: =B28 and for the overtime I have
been trying to use: =B28+-40 This works fine for 40 hours or more. When

the
employee works less than 40 however it returns a negative number which

throws
off the rest of the information in the sheet. i think i need a way to use
=(B28 +-40) if or=0
does anyone have any ideas?
Thanks in advance!






All times are GMT +1. The time now is 07:23 PM.

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