+ Reply to Thread
Results 1 to 6 of 6

To pick next PIC once the first PIC hits quota

  1. #1
    Forum Contributor
    Join Date
    05-09-2010
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    212

    To pick next PIC once the first PIC hits quota

    Individual assigned case based on country and daily target.
    Once individual A hits the quota, next person shall pick up the task.

    Issue 1:
    Example:
    Daily Target for Thailand is 10 cases.
    Thailand case handled by Ali & Barbara. Thailand case will be assigned to Ali up to 5 case. 6th - 10th case will be assigned to Barbara. The balance of case will be do tomorrow so, the PIC is TOMORROW.

    I manage to found the formula to assign 1st case to 5th case to Ali. Stuck at 6th - 10th & continue case PIC assignment.

    Issue 2:
    Example:
    Daily Target for Malaysia is 8 cases and handled by Cendect only. If Malaysia has less than 8 case, Cendect is required to do Thailand case to hit his quota which 8 case.

    Formula to assign Malaysia case no issue. Problem is how to assign Thailand case to Cendect ?
    Attached Files Attached Files
    Last edited by Shermaine2010; 06-19-2018 at 08:25 PM.

  2. #2
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: To pick next PIC once the first PIC hits quota

    Your current setup for Cendect and Gren's optional countries makes a formula difficult, so I would advise a new approach. I built a separate table in A29:D39 on your "Guide" sheet. This new table pulls numbers from your existing data but ranks the PIC's for each country in the order that they should be assigned cases and lists the number of cases each one can handle per country. With this table in place, you can use the following formula in C2 on "Case". It must be array-entered (confirmed with Ctrl + Shift + Enter instead of Enter):

    =IFERROR(INDEX(Guide!$B$30:$B$39,SMALL(IF((COUNTIFS($C$1:$C1,Guide!$B$30:$B$39,$B$1:$B1,Guide!$A$30:$A$39) < Guide!$D$30:$D$39)*([@Country]=Guide!$A$30:$A$39),ROW(Guide!$D$30:$D$39)-ROW(Guide!$D$30)+1),1)),"Tomorrow")

    Fill it down through the table on "Case" and it should match what you're looking for without relying on any of the info in F:K of "Case". The only exception is Henry's Japan assignments. Leaving both Japan and Henry's totals blank on the "Guide" sheet fails to indicate whether you intend Henry to handle all Japan cases or no Japan cases. The formula treats a blank as zero, so he has not been assigned cases. If you want him to have cases, enter a target for Japan in B7 or for Henry in B17 and the formula will give him cases. If you want to assign him all of the Japan cases, use the following in B7:

    =COUNTIF(Table1[Country],A7)

    Take a look at the attachment to see if the new approach is helpful:
    Attached Files Attached Files
    If your problem has been solved, please use "Thread Tools" to mark the thread as "Solved".

    If you're grateful for this site's existence and would like to contribute to the community, please consider posting something hilarious in our joke thread:
    https://www.excelforum.com/the-water...ke-thread.html

  3. #3
    Forum Contributor
    Join Date
    05-09-2010
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    212

    Re: To pick next PIC once the first PIC hits quota

    Quote Originally Posted by CAntosh View Post
    Your current setup for Cendect and Gren's optional countries makes a formula difficult, so I would advise a new approach. I built a separate table in A29:D39 on your "Guide" sheet. This new table pulls numbers from your existing data but ranks the PIC's for each country in the order that they should be assigned cases and lists the number of cases each one can handle per country. With this table in place, you can use the following formula in C2 on "Case". It must be array-entered (confirmed with Ctrl + Shift + Enter instead of Enter):

    =IFERROR(INDEX(Guide!$B$30:$B$39,SMALL(IF((COUNTIFS($C$1:$C1,Guide!$B$30:$B$39,$B$1:$B1,Guide!$A$30:$A$39) < Guide!$D$30:$D$39)*([@Country]=Guide!$A$30:$A$39),ROW(Guide!$D$30:$D$39)-ROW(Guide!$D$30)+1),1)),"Tomorrow")

    Fill it down through the table on "Case" and it should match what you're looking for without relying on any of the info in F:K of "Case". The only exception is Henry's Japan assignments. Leaving both Japan and Henry's totals blank on the "Guide" sheet fails to indicate whether you intend Henry to handle all Japan cases or no Japan cases. The formula treats a blank as zero, so he has not been assigned cases. If you want him to have cases, enter a target for Japan in B7 or for Henry in B17 and the formula will give him cases. If you want to assign him all of the Japan cases, use the following in B7:

    =COUNTIF(Table1[Country],A7)

    Take a look at the attachment to see if the new approach is helpful:
    Great. Finally got what I want.
    Thanks.
    Sometime is very hard to figure the correct approach.

  4. #4
    Forum Contributor
    Join Date
    05-09-2010
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    212

    Re: To pick next PIC once the first PIC hits quota

    Quote Originally Posted by CAntosh View Post
    Your current setup for Cendect and Gren's optional countries makes a formula difficult, so I would advise a new approach. I built a separate table in A29:D39 on your "Guide" sheet. This new table pulls numbers from your existing data but ranks the PIC's for each country in the order that they should be assigned cases and lists the number of cases each one can handle per country. With this table in place, you can use the following formula in C2 on "Case". It must be array-entered (confirmed with Ctrl + Shift + Enter instead of Enter):

    =IFERROR(INDEX(Guide!$B$30:$B$39,SMALL(IF((COUNTIFS($C$1:$C1,Guide!$B$30:$B$39,$B$1:$B1,Guide!$A$30:$A$39) < Guide!$D$30:$D$39)*([@Country]=Guide!$A$30:$A$39),ROW(Guide!$D$30:$D$39)-ROW(Guide!$D$30)+1),1)),"Tomorrow")

    Fill it down through the table on "Case" and it should match what you're looking for without relying on any of the info in F:K of "Case". The only exception is Henry's Japan assignments. Leaving both Japan and Henry's totals blank on the "Guide" sheet fails to indicate whether you intend Henry to handle all Japan cases or no Japan cases. The formula treats a blank as zero, so he has not been assigned cases. If you want him to have cases, enter a target for Japan in B7 or for Henry in B17 and the formula will give him cases. If you want to assign him all of the Japan cases, use the following in B7:

    =COUNTIF(Table1[Country],A7)

    Take a look at the attachment to see if the new approach is helpful:

    Another question:
    Possible to random pick the P IC.
    Example: Thailand handled by Ali & Barbara & Cendect (optional).
    In case sheet, Thailand case assign by Ali, Barbara,Cendect (optional), Ali, Barbara, Cendect (optional)...
    Instead of Ali, Ali, Ali, Ali --- Barbara, barbara,barbara,barbara, [as current formula].

  5. #5
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: To pick next PIC once the first PIC hits quota

    You describe two separate effects:

    Random: Barbara, Cendect, Ali, Cendect, Barbara, Barbara, Ali, Barbara, etc., randomly picking from the options until targets are reached.

    or

    Rotational: Ali, Barbara, Cendect, Ali, Barbara, Cendect, Ali, Barbara, etc., keeping the same order until targets are reached.

    Either choice is possible. Whichever formula you prefer should go in C2 and needs to be array-entered, then filled down (if the table doesn't fill it down automatically):

    Random (hit F9 to re-shuffle)
    =IFERROR(INDEX(Guide!$B$30:$B$39,SMALL(IF((COUNTIFS($C$1:$C1,Guide!$B$30:$B$39,$B$1:$B1,Guide!$A$30:$A$39) < Guide!$D$30:$D$39)*([@Country]=Guide!$A$30:$A$39),ROW(Guide!$D$30:$D$39)-ROW(Guide!$D$30)+1),RANDBETWEEN(1,SUMPRODUCT(--(((COUNTIFS($C$1:$C1,Guide!$B$30:$B$39,$B$1:$B1,Guide!$A$30:$A$39) < Guide!$D$30:$D$39)*([@Country]=Guide!$A$30:$A$39))=1))))),"Tomorrow")

    Rotational:
    =IFERROR(INDEX(Guide!$B$30:$B$39,SMALL(IF(IF((COUNTIFS($C$1:$C1,Guide!$B$30:$B$39,$B$1:$B1,Guide!$A$30:$A$39) < Guide!$D$30:$D$39)*([@Country]=Guide!$A$30:$A$39),COUNTIFS($C$1:$C1,Guide!$B$30:$B$39,$B$1:$B1,Guide!$A$30:$A$39))=MIN(IF((COUNTIFS($C$1:$C1,Guide!$B$30:$B$39,$B$1:$B1,Guide!$A$30:$A$39) < Guide!$D$30:$D$39)*([@Country]=Guide!$A$30:$A$39),COUNTIFS($C$1:$C1,Guide!$B$30:$B$39,$B$1:$B1,Guide!$A$30:$A$39))),ROW(Guide!$D$30:$D$39)-ROW(Guide!$D$30)+1),1)),"Tomorrow")

  6. #6
    Forum Contributor
    Join Date
    05-09-2010
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    212

    Re: To pick next PIC once the first PIC hits quota

    Further on the above requirement, added 1 new requirement called State.
    Refer to tab guide, if the state column is blank, that PIC will handle all case of that particular country.

    Can anyone help on this.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. if statement logic...determine quota
    By jw01 in forum Excel General
    Replies: 1
    Last Post: 02-17-2011, 03:40 PM
  2. weight average - quota
    By jw01 in forum Excel General
    Replies: 0
    Last Post: 12-23-2010, 01:21 PM
  3. Calculate quota
    By jw01 in forum Excel General
    Replies: 5
    Last Post: 11-28-2010, 10:20 PM
  4. adjustments for missing your quota
    By rwhite713 in forum Excel General
    Replies: 5
    Last Post: 07-11-2010, 12:25 PM
  5. Getting a quota from an array
    By Ancient in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-06-2009, 03:27 AM
  6. file attachments Exceeds your quota by 1.40 MB
    By martindwilson in forum ExcelTip.com Feedback / Comments / Suggestions
    Replies: 4
    Last Post: 08-21-2008, 11:57 AM
  7. VBA Excel ... Quota in string
    By Jezoo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-14-2007, 11:51 AM
  8. [SOLVED] Delete quota from a cell
    By Manos in forum Excel General
    Replies: 2
    Last Post: 03-21-2006, 05:25 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1