Allocated work via excel - complex formula or VBA

thedeadzeds

Active Member
Joined
Aug 16, 2011
Messages
442
Office Version
  1. 365
Platform
  1. Windows
Hi Guys,

I've been using excel to allocate work equally. Up until now this works ok but the formula i am using essentially looks at a list of work, looks at the staff members in the list called Blue Team Names and allocates out evenly. There are 2 tables below. To give you an idea the below formulas are used in the data table:

Column D (Additional work) =IF(OR(B2=B1, B1=B2, B2=B3), "Yes", "")
This column essentially looks at the number in the reg columns and if this is equal to the number above or below, then shows YES. Essentially picks up duplicates.

Column E (Allocated) =IF(COUNTIF(C$2:C2,C2)<=INT(COUNTIF($C$2:INDEX(C:C,MATCH(REPT("Z",255),C:C)),C2)/COUNTA(Blue_Team_Names[Name Lookup]))*COUNTA(Blue_Team_Names[Name Lookup]),INDEX(Blue_Team_Names[Name Lookup],MOD(COUNTIF(C$2:C2,C2)-1,COUNTA(Blue_Team_Names[Name Lookup]))+1),"Not allocated")
This column looks at all the types of work in the type column and equally allocates out the type of work based on the names in the blue team name list.

Column F (Allocated 2) =IF(D2="Yes",INDEX(E:E,MATCH(B2,B:B,0)),E2)
This column looks at the additional work column and if there is a yes, then it pulls in the name from the allocated column so essentially that person will be allocated all same regno numbers.

This works great but ideally i want to be able to allocate based on what i enter in the table below (allocate table).

I'm not even sure if this is possible but i hope this makes sense.

Many thanks


Allocate Table

DealerTypeBethanNicole FSoniaHannahJodieNot AllocatedAvailable to allocateTotal AllocatedCheck
CVWPOLK 1st Wave Service Contacts First Attempt Made21202077Ok
CVWPOLK 1st Wave Service Contacts New Call01010022Ok
CVWPOLK Cam Belt Due First Attempt Made00000000Ok
CVWPOLK Cam Belt Due New Call10010022Ok
CVWPOLK 1st Wave MOT Contacts First Attempt Made10011033Ok
CVW3rd Chance MOT First Attempt Made10001022Ok
CVWPOLK Brake Fluid Change First Attempt Made10000011Ok
BVWPOLK 1st Wave Service Contacts First Attempt Made01110033Ok
BVWPOLK 1st Wave Service Contacts New Call33300099Ok
BVWPOLK Cam Belt Due First Attempt Made10000011Ok
BVWPOLK Cam Belt Due New Call01011033Ok
BVWPOLK 1st Wave MOT Contacts First Attempt Made11100033Ok
BVW3rd Chance MOT First Attempt Made14112099Ok
BVWPOLK Brake Fluid Change First Attempt Made10000011Ok
CVWPOLK 1st Wave Service Contacts First Attempt Made11014077Ok
CVWPOLK 1st Wave Service Contacts New Call11000022Ok
CVWPOLK Cam Belt Due First Attempt Made00000000Ok
CVWPOLK Cam Belt Due New Call20000022Ok
CVWPOLK 1st Wave MOT Contacts First Attempt Made11100033Ok
CVW3rd Chance MOT First Attempt Made20000022Ok
CVWPOLK Brake Fluid Change First Attempt Made10000011Ok

<tbody>
</tbody>


DATA TABLE BELOW:
DealerRegNoTypeAdditional WorkAllocatedAllocated 2
CVW1POLK 1st Wave Service Contacts First Attempt MadeYesBethanBethan
NSK1POLK 1st Wave Service Contacts First Attempt MadeYesNicole FBethan
MCH1POLK 1st Wave Service Contacts First Attempt MadeYesSoniaBethan
CVW2POLK 1st Wave Service Contacts First Attempt MadeYesHannahHannah
NSK2POLK 1st Wave Service Contacts First Attempt MadeYesJodieHannah
CVW3POLK 1st Wave Service Contacts First Attempt MadeBethanBethan
CVW4POLK 1st Wave Service Contacts First Attempt MadeNicole FNicole F
CVW5POLK 1st Wave Service Contacts First Attempt MadeSoniaSonia
MCH6POLK 1st Wave Service Contacts First Attempt MadeHannahHannah
BVW7POLK 1st Wave Service Contacts First Attempt MadeJodieJodie
CF8POLK 1st Wave Service Contacts First Attempt MadeBethanBethan
BVW9POLK 1st Wave Service Contacts First Attempt MadeNicole FNicole F
CF10POLK 1st Wave Service Contacts First Attempt MadeSoniaSonia
CVW11POLK 1st Wave Service Contacts First Attempt MadeHannahHannah
NSK12POLK 1st Wave Service Contacts First Attempt MadeJodieJodie
CVW13POLK 1st Wave Service Contacts First Attempt MadeNot allocatedNot allocated
BVW14POLK 1st Wave Service Contacts First Attempt MadeNot allocatedNot allocated
MCH15POLK 1st Wave Service Contacts First Attempt MadeYesNot allocatedNot allocated
NSK15POLK 1st Wave Service Contacts First Attempt MadeYesNot allocatedNot allocated
CVW15POLK 1st Wave Service Contacts New CallYesBethanNot allocated
BVW15POLK 1st Wave Service Contacts New CallYesNicole FNot allocated
CF19POLK 1st Wave Service Contacts New CallSoniaSonia
CF20POLK 1st Wave Service Contacts New CallHannahHannah
CF21POLK 1st Wave Service Contacts New CallJodieJodie
NSK22POLK 1st Wave Service Contacts New CallBethanBethan
BVW23POLK 1st Wave Service Contacts New CallNicole FNicole F
MCH24POLK 1st Wave Service Contacts New CallSoniaSonia
BVW25POLK 1st Wave Service Contacts New CallHannahHannah
BVW26POLK 1st Wave Service Contacts New CallJodieJodie
CF27POLK 1st Wave Service Contacts New CallBethanBethan
NSK28POLK 1st Wave Service Contacts New CallNicole FNicole F
CF29POLK 1st Wave Service Contacts New CallSoniaSonia
NSK30POLK Cam Belt Due First Attempt MadeNot allocatedNot allocated
CF31POLK Cam Belt Due First Attempt MadeNot allocatedNot allocated
BVW32POLK Cam Belt Due First Attempt MadeNot allocatedNot allocated
MCH33POLK Cam Belt Due First Attempt MadeNot allocatedNot allocated
BVW34POLK Cam Belt Due New CallBethanBethan
CF35POLK Cam Belt Due New CallNicole FNicole F
CF36POLK Cam Belt Due New CallSoniaSonia
BVW37POLK Cam Belt Due New CallHannahHannah
NSK38POLK Cam Belt Due New CallYesJodieJodie
BVW38POLK Cam Belt Due New CallYesNot allocatedJodie
CVW38POLK Cam Belt Due New CallYesNot allocatedJodie
CVW38POLK Cam Belt Due New CallYesNot allocatedJodie
NSK42POLK 1st Wave MOT Contacts First Attempt MadeBethanBethan
NSK43POLK 1st Wave MOT Contacts First Attempt MadeNicole FNicole F
CVW44POLK 1st Wave MOT Contacts First Attempt MadeSoniaSonia
BVW45POLK 1st Wave MOT Contacts First Attempt MadeHannahHannah
MCH46POLK 1st Wave MOT Contacts First Attempt MadeJodieJodie
BVW47POLK 1st Wave MOT Contacts First Attempt MadeBethanBethan
NSK48POLK 1st Wave MOT Contacts First Attempt MadeNicole FNicole F
BVW49POLK 1st Wave MOT Contacts First Attempt MadeSoniaSonia
CVW50POLK 1st Wave MOT Contacts First Attempt MadeHannahHannah
CVW513rd Chance MOT First Attempt MadeBethanBethan
BVW523rd Chance MOT First Attempt MadeNicole FNicole F
BVW533rd Chance MOT First Attempt MadeSoniaSonia
BVW543rd Chance MOT First Attempt MadeHannahHannah
NSK553rd Chance MOT First Attempt MadeJodieJodie
MCH563rd Chance MOT First Attempt MadeBethanBethan
CF573rd Chance MOT First Attempt MadeNicole FNicole F
BVW58POLK 1st Wave Service Contacts New CallHannahHannah
BVW59POLK 1st Wave Service Contacts New CallJodieJodie
MCH60POLK 1st Wave Service Contacts New CallBethanBethan
CVW61POLK 1st Wave Service Contacts New CallNicole FNicole F
BVW62POLK 1st Wave Service Contacts New CallSoniaSonia
NSK63POLK Brake Fluid Change First Attempt MadeNot allocatedNot allocated
CVW64POLK Brake Fluid Change First Attempt MadeNot allocatedNot allocated
NSK65POLK Brake Fluid Change First Attempt MadeNot allocatedNot allocated
BVW66POLK Brake Fluid Change First Attempt MadeNot allocatedNot allocated
CVW67POLK 1st Wave MOT Contacts First Attempt MadeJodieJodie
CVW683rd Chance MOT First Attempt MadeSoniaSonia
BVW693rd Chance MOT First Attempt MadeHannahHannah
BVW703rd Chance MOT First Attempt MadeJodieJodie
BVW713rd Chance MOT First Attempt MadeBethanBethan
NSK723rd Chance MOT First Attempt MadeNicole FNicole F
MCH733rd Chance MOT First Attempt MadeSoniaSonia
CF743rd Chance MOT First Attempt MadeHannahHannah
BVW75POLK 1st Wave Service Contacts New CallHannahHannah
BVW76POLK 1st Wave Service Contacts New CallJodieJodie
BVW773rd Chance MOT First Attempt MadeJodieJodie
BVW783rd Chance MOT First Attempt MadeNot allocatedNot allocated
BVW793rd Chance MOT First Attempt MadeNot allocatedNot allocated
NSK803rd Chance MOT First Attempt MadeNot allocatedNot allocated
MCH813rd Chance MOT First Attempt MadeNot allocatedNot allocated

<tbody>
</tbody>
 
Last edited:

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,215,817
Messages
6,127,041
Members
449,356
Latest member
tstapleton67

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top