#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JP JP is offline
external usenet poster
 
Posts: 103
Default SumIF

I currently have a function that I would like to tweak a little.
Here is the scenario:
Example: Actual Hours Total Comptime Overtime
AE AJ AL AM
169 180 12 0
Comp time is given for the first three Actual hours over 168. After 171
actual hours it goes to overtime. However, if total time exceeds 168 and
actual hours does not exceed 171, I need it to calculate comptime for hours
over 168. When I do this now it automatically goes to 3 in the AL column.

Here is the formula currenty in use.
=IF(AE6<171,MAX(0,AJ6-168),MAX(0,MIN(3,AJ6-168)))

Any ideas?
It is confusing to even try to explain it let alone understand it.
Thanks
JP

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 268
Default SumIF

=IF(AND(AJ6168,AE6<171),MAX(0,AJ6-168),MAX(0,MIN(3,AJ6-168)))

"JP" wrote:

I currently have a function that I would like to tweak a little.
Here is the scenario:
Example: Actual Hours Total Comptime Overtime
AE AJ AL AM
169 180 12 0
Comp time is given for the first three Actual hours over 168. After 171
actual hours it goes to overtime. However, if total time exceeds 168 and
actual hours does not exceed 171, I need it to calculate comptime for hours
over 168. When I do this now it automatically goes to 3 in the AL column.

Here is the formula currenty in use.
=IF(AE6<171,MAX(0,AJ6-168),MAX(0,MIN(3,AJ6-168)))

Any ideas?
It is confusing to even try to explain it let alone understand it.
Thanks
JP

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JP JP is offline
external usenet poster
 
Posts: 103
Default SumIF

You are a genius.

Thanks for the help

"kassie" wrote:

=IF(AND(AJ6168,AE6<171),MAX(0,AJ6-168),MAX(0,MIN(3,AJ6-168)))

"JP" wrote:

I currently have a function that I would like to tweak a little.
Here is the scenario:
Example: Actual Hours Total Comptime Overtime
AE AJ AL AM
169 180 12 0
Comp time is given for the first three Actual hours over 168. After 171
actual hours it goes to overtime. However, if total time exceeds 168 and
actual hours does not exceed 171, I need it to calculate comptime for hours
over 168. When I do this now it automatically goes to 3 in the AL column.

Here is the formula currenty in use.
=IF(AE6<171,MAX(0,AJ6-168),MAX(0,MIN(3,AJ6-168)))

Any ideas?
It is confusing to even try to explain it let alone understand it.
Thanks
JP

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 268
Default SumIF

My pleasure!

"JP" wrote:

You are a genius.

Thanks for the help

"kassie" wrote:

=IF(AND(AJ6168,AE6<171),MAX(0,AJ6-168),MAX(0,MIN(3,AJ6-168)))

"JP" wrote:

I currently have a function that I would like to tweak a little.
Here is the scenario:
Example: Actual Hours Total Comptime Overtime
AE AJ AL AM
169 180 12 0
Comp time is given for the first three Actual hours over 168. After 171
actual hours it goes to overtime. However, if total time exceeds 168 and
actual hours does not exceed 171, I need it to calculate comptime for hours
over 168. When I do this now it automatically goes to 3 in the AL column.

Here is the formula currenty in use.
=IF(AE6<171,MAX(0,AJ6-168),MAX(0,MIN(3,AJ6-168)))

Any ideas?
It is confusing to even try to explain it let alone understand it.
Thanks
JP

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
How to use SUMIF to return sums between two values located in cells ScottBerger Excel Worksheet Functions 2 April 23rd 23 09:05 PM
How to use SUMIF function with non-adjacent cells KLaw Excel Worksheet Functions 5 October 19th 06 10:15 AM
Sumif of Sumif perhaps? Fred Excel Discussion (Misc queries) 2 March 29th 06 05:39 PM
SUMIF Ferg Excel Worksheet Functions 3 February 28th 06 03:37 AM
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function Oscar Excel Worksheet Functions 2 January 11th 05 11:01 PM


All times are GMT +1. The time now is 03:51 PM.

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"