Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Function IF statement

I need to know how to get this column to say: If the hours worked are more
than 40 then take time and a half and multiply that times the difference
between the hours worked and 40 and in that same cell add the regular hour to
the overtime pay. i've got it about 98% done but cannot get the last part.
please help me with this if you can. my spreadsheet is below and the IF
statement looks like this:

Hours Worked Hourly Pay Commission Earned Hourly Pay Earned
C D E F
1 30.00 $10.00 $562.50 $300.00
2 25.00 $10.00 $300.00 $250.00
3 40.00 $10.00 $825.00 $400.00
4 45.00 $15.00 $- $112.50
5 40.00 $12.50 $- $500.00
6 35.00 $10.00 $267.00 $350.00

In cell F: =IF(C240,((D2/2)+D2)*(C2-40),C2*D2)

Thanks so much in advance!
Raymond


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default Function IF statement

=IF(C1<=40,C1*D1,C1*D1+(C1-40)*D1*1.5). What does Commissioned Earned have
to do with it?

Tyro

"Raymond" wrote in message
...
I need to know how to get this column to say: If the hours worked are more
than 40 then take time and a half and multiply that times the difference
between the hours worked and 40 and in that same cell add the regular hour
to
the overtime pay. i've got it about 98% done but cannot get the last
part.
please help me with this if you can. my spreadsheet is below and the IF
statement looks like this:

Hours Worked Hourly Pay Commission Earned Hourly Pay Earned
C D E
F
1 30.00 $10.00 $562.50 $300.00
2 25.00 $10.00 $300.00 $250.00
3 40.00 $10.00 $825.00 $400.00
4 45.00 $15.00 $- $112.50
5 40.00 $12.50 $- $500.00
6 35.00 $10.00 $267.00 $350.00

In cell F: =IF(C240,((D2/2)+D2)*(C2-40),C2*D2)

Thanks so much in advance!
Raymond




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Function IF statement

On Fri, 1 Feb 2008 18:36:00 -0800, Raymond
wrote:

I need to know how to get this column to say: If the hours worked are more
than 40 then take time and a half and multiply that times the difference
between the hours worked and 40 and in that same cell add the regular hour to
the overtime pay. i've got it about 98% done but cannot get the last part.
please help me with this if you can. my spreadsheet is below and the IF
statement looks like this:

Hours Worked Hourly Pay Commission Earned Hourly Pay Earned
C D E F
1 30.00 $10.00 $562.50 $300.00
2 25.00 $10.00 $300.00 $250.00
3 40.00 $10.00 $825.00 $400.00
4 45.00 $15.00 $- $112.50
5 40.00 $12.50 $- $500.00
6 35.00 $10.00 $267.00 $350.00

In cell F: =IF(C240,((D2/2)+D2)*(C2-40),C2*D2)

Thanks so much in advance!
Raymond


It is not clear to me exactly what you want.

To compute the total hourly + overtime compensation, you could use this
formula:

=D2*(C2+MAX(0,C2-40)*1.5)


--ron
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Function IF statement

Try this:

=IF(C2="",0,MIN(C2,40)*D2+MAX(C2-40,0)*(D2*1.5))

--
Biff
Microsoft Excel MVP


"Raymond" wrote in message
...
I need to know how to get this column to say: If the hours worked are more
than 40 then take time and a half and multiply that times the difference
between the hours worked and 40 and in that same cell add the regular hour
to
the overtime pay. i've got it about 98% done but cannot get the last
part.
please help me with this if you can. my spreadsheet is below and the IF
statement looks like this:

Hours Worked Hourly Pay Commission Earned Hourly Pay Earned
C D E
F
1 30.00 $10.00 $562.50 $300.00
2 25.00 $10.00 $300.00 $250.00
3 40.00 $10.00 $825.00 $400.00
4 45.00 $15.00 $- $112.50
5 40.00 $12.50 $- $500.00
6 35.00 $10.00 $267.00 $350.00

In cell F: =IF(C240,((D2/2)+D2)*(C2-40),C2*D2)

Thanks so much in advance!
Raymond




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Function IF statement

"Ron Rosenfeld" wrote in message
...
On Fri, 1 Feb 2008 18:36:00 -0800, Raymond

wrote:

I need to know how to get this column to say: If the hours worked are
more
than 40 then take time and a half and multiply that times the difference
between the hours worked and 40 and in that same cell add the regular hour
to
the overtime pay. i've got it about 98% done but cannot get the last
part.
please help me with this if you can. my spreadsheet is below and the IF
statement looks like this:

Hours Worked Hourly Pay Commission Earned Hourly Pay Earned
C D E
F
1 30.00 $10.00 $562.50 $300.00
2 25.00 $10.00 $300.00 $250.00
3 40.00 $10.00 $825.00 $400.00
4 45.00 $15.00 $- $112.50
5 40.00 $12.50 $- $500.00
6 35.00 $10.00 $267.00 $350.00

In cell F: =IF(C240,((D2/2)+D2)*(C2-40),C2*D2)

Thanks so much in advance!
Raymond


It is not clear to me exactly what you want.

To compute the total hourly + overtime compensation, you could use this
formula:

=D2*(C2+MAX(0,C2-40)*1.5)


--ron


That returns an incorrect result when hours 40.

The first reference to C2 needs to be reduced to straight-time hours if
hours 40:

=D2*(MIN(C2,40)+MAX(0,C2-40)*1.5)

--
Biff
Microsoft Excel MVP




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default Function IF statement

Why make it so complex? with Min Max?? Just take the hours <= 40 at straight
time and then over 40 at time & a half.

Tyro

"T. Valko" wrote in message
...
Try this:

=IF(C2="",0,MIN(C2,40)*D2+MAX(C2-40,0)*(D2*1.5))

--
Biff
Microsoft Excel MVP


"Raymond" wrote in message
...
I need to know how to get this column to say: If the hours worked are
more
than 40 then take time and a half and multiply that times the difference
between the hours worked and 40 and in that same cell add the regular
hour to
the overtime pay. i've got it about 98% done but cannot get the last
part.
please help me with this if you can. my spreadsheet is below and the IF
statement looks like this:

Hours Worked Hourly Pay Commission Earned Hourly Pay Earned
C D E F
1 30.00 $10.00 $562.50 $300.00
2 25.00 $10.00 $300.00 $250.00
3 40.00 $10.00 $825.00 $400.00
4 45.00 $15.00 $- $112.50
5 40.00 $12.50 $- $500.00
6 35.00 $10.00 $267.00 $350.00

In cell F: =IF(C240,((D2/2)+D2)*(C2-40),C2*D2)

Thanks so much in advance!
Raymond






  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default Function IF statement

correction: ==IF(C1<=40,C1*D1,40*D1+(C1-40)*D1*1.5)

Tyro
"Tyro" wrote in message
t...
=IF(C1<=40,C1*D1,C1*D1+(C1-40)*D1*1.5). What does Commissioned Earned have
to do with it?

Tyro

"Raymond" wrote in message
...
I need to know how to get this column to say: If the hours worked are
more
than 40 then take time and a half and multiply that times the difference
between the hours worked and 40 and in that same cell add the regular
hour to
the overtime pay. i've got it about 98% done but cannot get the last
part.
please help me with this if you can. my spreadsheet is below and the IF
statement looks like this:

Hours Worked Hourly Pay Commission Earned Hourly Pay Earned
C D E F
1 30.00 $10.00 $562.50 $300.00
2 25.00 $10.00 $300.00 $250.00
3 40.00 $10.00 $825.00 $400.00
4 45.00 $15.00 $- $112.50
5 40.00 $12.50 $- $500.00
6 35.00 $10.00 $267.00 $350.00

In cell F: =IF(C240,((D2/2)+D2)*(C2-40),C2*D2)

Thanks so much in advance!
Raymond






  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Function IF statement

Why make it so complex?

I guess complexity is a matter of opinion.

At least my formula returns the *correct* result! <g

Your formula returns the incorrect result when hours 40.

Hours = 48
Rate = 10
OT rate = 15

Reg hours = 40*10 = 400
OT hours = 8*15 = 120

Total pay = 520
Your formula = 600

Are you hiring? I'd love to work for you! <BG

--
Biff
Microsoft Excel MVP


"Tyro" wrote in message
...
Why make it so complex? with Min Max?? Just take the hours <= 40 at
straight time and then over 40 at time & a half.

Tyro

"T. Valko" wrote in message
...
Try this:

=IF(C2="",0,MIN(C2,40)*D2+MAX(C2-40,0)*(D2*1.5))

--
Biff
Microsoft Excel MVP


"Raymond" wrote in message
...
I need to know how to get this column to say: If the hours worked are
more
than 40 then take time and a half and multiply that times the difference
between the hours worked and 40 and in that same cell add the regular
hour to
the overtime pay. i've got it about 98% done but cannot get the last
part.
please help me with this if you can. my spreadsheet is below and the IF
statement looks like this:

Hours Worked Hourly Pay Commission Earned Hourly Pay Earned
C D E F
1 30.00 $10.00 $562.50 $300.00
2 25.00 $10.00 $300.00 $250.00
3 40.00 $10.00 $825.00 $400.00
4 45.00 $15.00 $- $112.50
5 40.00 $12.50 $- $500.00
6 35.00 $10.00 $267.00 $350.00

In cell F: =IF(C240,((D2/2)+D2)*(C2-40),C2*D2)

Thanks so much in advance!
Raymond








  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default Function IF statement

Mistake. I corrected it. To obfuscate serves no purpose. I believe in the
KISS principle.

Tyro

"T. Valko" wrote in message
...
Why make it so complex?


I guess complexity is a matter of opinion.

At least my formula returns the *correct* result! <g

Your formula returns the incorrect result when hours 40.

Hours = 48
Rate = 10
OT rate = 15

Reg hours = 40*10 = 400
OT hours = 8*15 = 120

Total pay = 520
Your formula = 600

Are you hiring? I'd love to work for you! <BG

--
Biff
Microsoft Excel MVP


"Tyro" wrote in message
...
Why make it so complex? with Min Max?? Just take the hours <= 40 at
straight time and then over 40 at time & a half.

Tyro

"T. Valko" wrote in message
...
Try this:

=IF(C2="",0,MIN(C2,40)*D2+MAX(C2-40,0)*(D2*1.5))

--
Biff
Microsoft Excel MVP


"Raymond" wrote in message
...
I need to know how to get this column to say: If the hours worked are
more
than 40 then take time and a half and multiply that times the
difference
between the hours worked and 40 and in that same cell add the regular
hour to
the overtime pay. i've got it about 98% done but cannot get the last
part.
please help me with this if you can. my spreadsheet is below and the
IF
statement looks like this:

Hours Worked Hourly Pay Commission Earned Hourly Pay Earned
C D E F
1 30.00 $10.00 $562.50 $300.00
2 25.00 $10.00 $300.00 $250.00
3 40.00 $10.00 $825.00 $400.00
4 45.00 $15.00 $- $112.50
5 40.00 $12.50 $- $500.00
6 35.00 $10.00 $267.00 $350.00

In cell F: =IF(C240,((D2/2)+D2)*(C2-40),C2*D2)

Thanks so much in advance!
Raymond










  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Function IF statement

On Fri, 01 Feb 2008 22:01:54 -0500, Ron Rosenfeld
wrote:

On Fri, 1 Feb 2008 18:36:00 -0800, Raymond
wrote:

I need to know how to get this column to say: If the hours worked are more
than 40 then take time and a half and multiply that times the difference
between the hours worked and 40 and in that same cell add the regular hour to
the overtime pay. i've got it about 98% done but cannot get the last part.
please help me with this if you can. my spreadsheet is below and the IF
statement looks like this:

Hours Worked Hourly Pay Commission Earned Hourly Pay Earned
C D E F
1 30.00 $10.00 $562.50 $300.00
2 25.00 $10.00 $300.00 $250.00
3 40.00 $10.00 $825.00 $400.00
4 45.00 $15.00 $- $112.50
5 40.00 $12.50 $- $500.00
6 35.00 $10.00 $267.00 $350.00

In cell F: =IF(C240,((D2/2)+D2)*(C2-40),C2*D2)

Thanks so much in advance!
Raymond


It is not clear to me exactly what you want.

To compute the total hourly + overtime compensation, you could use this
formula:

=D2*(C2+MAX(0,C2-40)*1.5)


--ron



Should be:

=C2*D2+D2*0.5*MAX(0,C2-40)
--ron


  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Function IF statement

On Fri, 1 Feb 2008 22:42:28 -0500, "T. Valko" wrote:

That returns an incorrect result when hours 40.

The first reference to C2 needs to be reduced to straight-time hours if
hours 40:

=D2*(MIN(C2,40)+MAX(0,C2-40)*1.5)

--
Biff
Microsoft Excel MVP


Yup, I was looking at a wrong total along the way.

=C2*D2+D2*0.5*MAX(0,C2-40)

is shorter with no MIN
--ron
  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Function IF statement

On Fri, 01 Feb 2008 23:34:50 -0500, Ron Rosenfeld
wrote:

Should be:

=C2*D2+D2*0.5*MAX(0,C2-40)


Or a bit shorter:


=D2*(C2+0.5*MAX(0,C2-40))


--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Function Conflicts with an If/Then Statement mcowan3 Excel Worksheet Functions 3 November 15th 07 08:08 PM
WORKDAY Function in an IF statement [email protected] Excel Worksheet Functions 2 January 19th 07 03:45 PM
Round function in If statement penri0_0 Excel Discussion (Misc queries) 3 May 25th 06 12:50 PM
Using date function in an if statement M Smith Excel Worksheet Functions 2 March 30th 05 06:53 PM
Countif Function with and Statement Matt Excel Worksheet Functions 3 March 4th 05 08:32 PM


All times are GMT +1. The time now is 09:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"