Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Multiple If and Large functions in formula don't handle all circum

I have the following formula in a small table

=IF($D$380,IF($H$270,IF(E41=LARGE($E$41:$E$52,1) ,$D$38,0),IF(H41=LARGE($H$41:$H$52,1),$D$38,0)),0)

The formula looks at D38 to see if there is overtime then it looks to H27 to
see if there is hourly pay (there might not be due to all the pay from this
week being Piecework...but overtime still needs to be calcualted if there are
OT hours). If there is OT and there is hourly pay the formula looks int the
table e41:e52 to determine the department with the most hours and asigns the
OT to that department. If there is not any hourly pay the formula looks to
the table in H41:H52 to see which department had the most piecework pay and
allocates the OT to that department.

The formula works GREAT with one minor flaw. If there are 2 or more
departments tied for the most hours the OT gets incorrectly put to all of the
departments that are tied. I can't think of an easy way to solve this and
was hoping for some help. I welcome any thoughts, and thanks in advance if
you can provide any help!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Multiple If and Large functions in formula don't handle all circum

Could try this:

=IF(AND($D$380,$H$270,COUNTIF(E$41:E41,E41)<2,OR (AND($H$270,RANK(E41,$E$41:$E$52)=1),AND($H$27<=0 ,RANK(H41,$H$41:$H$52)=1))),$D$38,0)

The COUNTIF will check to make sure the value hasn't already appeared in the
list. I also took the liberty of grouping all your conditions together, as
you only have 2 possible outcomes.

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Bcosta" wrote:

I have the following formula in a small table

=IF($D$380,IF($H$270,IF(E41=LARGE($E$41:$E$52,1) ,$D$38,0),IF(H41=LARGE($H$41:$H$52,1),$D$38,0)),0)

The formula looks at D38 to see if there is overtime then it looks to H27 to
see if there is hourly pay (there might not be due to all the pay from this
week being Piecework...but overtime still needs to be calcualted if there are
OT hours). If there is OT and there is hourly pay the formula looks int the
table e41:e52 to determine the department with the most hours and asigns the
OT to that department. If there is not any hourly pay the formula looks to
the table in H41:H52 to see which department had the most piecework pay and
allocates the OT to that department.

The formula works GREAT with one minor flaw. If there are 2 or more
departments tied for the most hours the OT gets incorrectly put to all of the
departments that are tied. I can't think of an easy way to solve this and
was hoping for some help. I welcome any thoughts, and thanks in advance if
you can provide any help!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Multiple If and Large functions in formula don't handle all ci

If d38 0 there is overtime and it needs to be allocated. if H27 0 then
it uses the hours column (E) to determine where it gets allocated, if H27 = 0
then it uses the piecework dollars column (H) to determine where it gets
allocated. Your formula does not work if H27=0.

"Luke M" wrote:

Could try this:

=IF(AND($D$380,$H$270,COUNTIF(E$41:E41,E41)<2,OR (AND($H$270,RANK(E41,$E$41:$E$52)=1),AND($H$27<=0 ,RANK(H41,$H$41:$H$52)=1))),$D$38,0)

The COUNTIF will check to make sure the value hasn't already appeared in the
list. I also took the liberty of grouping all your conditions together, as
you only have 2 possible outcomes.

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Bcosta" wrote:

I have the following formula in a small table

=IF($D$380,IF($H$270,IF(E41=LARGE($E$41:$E$52,1) ,$D$38,0),IF(H41=LARGE($H$41:$H$52,1),$D$38,0)),0)

The formula looks at D38 to see if there is overtime then it looks to H27 to
see if there is hourly pay (there might not be due to all the pay from this
week being Piecework...but overtime still needs to be calcualted if there are
OT hours). If there is OT and there is hourly pay the formula looks int the
table e41:e52 to determine the department with the most hours and asigns the
OT to that department. If there is not any hourly pay the formula looks to
the table in H41:H52 to see which department had the most piecework pay and
allocates the OT to that department.

The formula works GREAT with one minor flaw. If there are 2 or more
departments tied for the most hours the OT gets incorrectly put to all of the
departments that are tied. I can't think of an easy way to solve this and
was hoping for some help. I welcome any thoughts, and thanks in advance if
you can provide any help!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Multiple If and Large functions in formula don't handle all ci

Apologies, I have the criteria in wrong place. Should be:

=IF(AND($D$380,OR(AND(COUNTIF(E$41:E41,E41)<2,$H$ 270,RANK(E41,$E$41:$E$52)=1),AND(COUNTIF(H$41:H41 ,H41)<2,$H$27<=0,RANK(H41,$H$41:$H$52)=1))),$D$38, 0)

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Bcosta" wrote:

If d38 0 there is overtime and it needs to be allocated. if H27 0 then
it uses the hours column (E) to determine where it gets allocated, if H27 = 0
then it uses the piecework dollars column (H) to determine where it gets
allocated. Your formula does not work if H27=0.

"Luke M" wrote:

Could try this:

=IF(AND($D$380,$H$270,COUNTIF(E$41:E41,E41)<2,OR (AND($H$270,RANK(E41,$E$41:$E$52)=1),AND($H$27<=0 ,RANK(H41,$H$41:$H$52)=1))),$D$38,0)

The COUNTIF will check to make sure the value hasn't already appeared in the
list. I also took the liberty of grouping all your conditions together, as
you only have 2 possible outcomes.

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Bcosta" wrote:

I have the following formula in a small table

=IF($D$380,IF($H$270,IF(E41=LARGE($E$41:$E$52,1) ,$D$38,0),IF(H41=LARGE($H$41:$H$52,1),$D$38,0)),0)

The formula looks at D38 to see if there is overtime then it looks to H27 to
see if there is hourly pay (there might not be due to all the pay from this
week being Piecework...but overtime still needs to be calcualted if there are
OT hours). If there is OT and there is hourly pay the formula looks int the
table e41:e52 to determine the department with the most hours and asigns the
OT to that department. If there is not any hourly pay the formula looks to
the table in H41:H52 to see which department had the most piecework pay and
allocates the OT to that department.

The formula works GREAT with one minor flaw. If there are 2 or more
departments tied for the most hours the OT gets incorrectly put to all of the
departments that are tied. I can't think of an easy way to solve this and
was hoping for some help. I welcome any thoughts, and thanks in advance if
you can provide any help!

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 large can a file get before it is too big for Excel to handle? cphalen Excel Discussion (Misc queries) 6 August 26th 08 07:38 PM
need way to handle large csv imports that overflow cell size remay Excel Discussion (Misc queries) 3 March 6th 07 02:04 PM
Excel Beta 2007 on PC: unable to handle very large workbooks? Victor Excel Discussion (Misc queries) 1 October 5th 06 12:31 PM
large formula question - Max nested functions PCLIVE Excel Worksheet Functions 3 October 17th 05 04:20 PM


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