Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JP JP is offline
external usenet poster
 
Posts: 103
Default Add one until 171 is reached

Hello.
This is my scenario for a time sheet.
If total hours worked are over 168 then each hour over is equal to comp time
until 171 is reached. How can I put this into a function.
Here is the set-up example:
AE6 AJ6 AL6
Actual Hours Total Hours Comp Time
Worked
169 169 1

There is also another caveat. If actual hours worked are less than 168, but
total hours is over 168, than hours over 168 equal comp time.
Scenario #2:
AE6 AJ6 AL6
Actual Hours Total Hours Comp Time
Worked
160 172 4

This may be too difficult or not possible to do, but any help is greatly
appreciated. This is the last thing I have to do to complete the time sheet.
Thanks
JP

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 418
Default Add one until 171 is reached

JP wrote:
If total hours worked are over 168 then each hour over is equal to comp time
until 171 is reached. How can I put this into a function.
Here is the set-up example:
AE6 AJ6 AL6
Actual Hours Total Hours Comp Time
Worked
169 169 1

There is also another caveat. If actual hours worked are less than 168, but
total hours is over 168, than hours over 168 equal comp time.
Scenario #2:
AE6 AJ6 AL6
Actual Hours Total Hours Comp Time
Worked
160 172 4


In AL6:

=if(AE6 < 168, max(0, AJ6 - 168), max(0, max(171, AJ6) - 168))

The last part could also be written max(0, min(3, AJ6 - 168)).

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 296
Default Add one until 171 is reached

Which takes precedence if Total hours are over 168 and Actual hours
are less than 168 as per yout two examples?

Rgds

On Sun, 15 Oct 2006 15:46:01 -0700, JP
wrote:

Hello.
This is my scenario for a time sheet.
If total hours worked are over 168 then each hour over is equal to comp time
until 171 is reached. How can I put this into a function.
Here is the set-up example:
AE6 AJ6 AL6
Actual Hours Total Hours Comp Time
Worked
169 169 1

There is also another caveat. If actual hours worked are less than 168, but
total hours is over 168, than hours over 168 equal comp time.
Scenario #2:
AE6 AJ6 AL6
Actual Hours Total Hours Comp Time
Worked
160 172 4

This may be too difficult or not possible to do, but any help is greatly
appreciated. This is the last thing I have to do to complete the time sheet.
Thanks
JP


__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JP JP is offline
external usenet poster
 
Posts: 103
Default Add one until 171 is reached

I am not sure. They seem to be one in the same

"Richard Buttrey" wrote:

Which takes precedence if Total hours are over 168 and Actual hours
are less than 168 as per yout two examples?

Rgds

On Sun, 15 Oct 2006 15:46:01 -0700, JP
wrote:

Hello.
This is my scenario for a time sheet.
If total hours worked are over 168 then each hour over is equal to comp time
until 171 is reached. How can I put this into a function.
Here is the set-up example:
AE6 AJ6 AL6
Actual Hours Total Hours Comp Time
Worked
169 169 1

There is also another caveat. If actual hours worked are less than 168, but
total hours is over 168, than hours over 168 equal comp time.
Scenario #2:
AE6 AJ6 AL6
Actual Hours Total Hours Comp Time
Worked
160 172 4

This may be too difficult or not possible to do, but any help is greatly
appreciated. This is the last thing I have to do to complete the time sheet.
Thanks
JP


__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JP JP is offline
external usenet poster
 
Posts: 103
Default Add one until 171 is reached

This was exactly what I needed. Now I can complete this project.

Thanks a bunch

JP

" wrote:

JP wrote:
If total hours worked are over 168 then each hour over is equal to comp time
until 171 is reached. How can I put this into a function.
Here is the set-up example:
AE6 AJ6 AL6
Actual Hours Total Hours Comp Time
Worked
169 169 1

There is also another caveat. If actual hours worked are less than 168, but
total hours is over 168, than hours over 168 equal comp time.
Scenario #2:
AE6 AJ6 AL6
Actual Hours Total Hours Comp Time
Worked
160 172 4


In AL6:

=if(AE6 < 168, max(0, AJ6 - 168), max(0, max(171, AJ6) - 168))

The last part could also be written max(0, min(3, AJ6 - 168)).




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 296
Default Add one until 171 is reached

If I'm reading your two examples correctly they can give different
answers unless Total Hours are in some way arithmetically related to
Actual hours. Which is why presumably you mentioned the second caveat.

However if the suggested answer is working OK, it's obviously my
interpretation of you Q. that is wrong.

Rgds


On Sun, 15 Oct 2006 18:13:01 -0700, JP
wrote:

I am not sure. They seem to be one in the same

"Richard Buttrey" wrote:

Which takes precedence if Total hours are over 168 and Actual hours
are less than 168 as per yout two examples?

Rgds

On Sun, 15 Oct 2006 15:46:01 -0700, JP
wrote:

Hello.
This is my scenario for a time sheet.
If total hours worked are over 168 then each hour over is equal to comp time
until 171 is reached. How can I put this into a function.
Here is the set-up example:
AE6 AJ6 AL6
Actual Hours Total Hours Comp Time
Worked
169 169 1

There is also another caveat. If actual hours worked are less than 168, but
total hours is over 168, than hours over 168 equal comp time.
Scenario #2:
AE6 AJ6 AL6
Actual Hours Total Hours Comp Time
Worked
160 172 4

This may be too difficult or not possible to do, but any help is greatly
appreciated. This is the last thing I have to do to complete the time sheet.
Thanks
JP


__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________


__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
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
create a pop-up alert when a condition is reached in excel Crazy Horse Excel Discussion (Misc queries) 3 June 19th 06 01:04 PM
How do I run a macro when a pre-determined time has been reached . NAMATA Excel Discussion (Misc queries) 1 April 19th 06 08:12 PM
Counting blank cells until value is reached Dan Excel Worksheet Functions 9 March 1st 06 12:56 PM
Autofill until blank cell is reached uberathlete Excel Discussion (Misc queries) 7 November 4th 05 05:43 PM
Run recalc until a specified vaule is reached. comotoman Excel Discussion (Misc queries) 3 September 27th 05 01:46 AM


All times are GMT +1. The time now is 03:27 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"