even distribution formula/ macro distribute list evenly based on criteria

Status
Not open for further replies.

jacinthn

Board Regular
Joined
Jun 15, 2010
Messages
96
i'm having trouble combining a INDEX MATCH with multiple criteria with a distribution formula i use
i have 15 unique representatives and 3 work multiple state grouping so 17 total
Availble Reps</SPAN>
States worked by each rep</SPAN>
J/NJ</SPAN>
David A</SPAN>
AZ CA CO ID MT NV OR UT WA WY </SPAN>
J</SPAN>
Charles B</SPAN>
AZ CA CO ID MT NV OR UT WA WY </SPAN>
J</SPAN>
Ryan V</SPAN>
AZ CA CO ID MT NV OR UT WA WY </SPAN>
J</SPAN>
John G</SPAN>
AZ CA CO ID MT NV OR UT WA WY </SPAN>
J</SPAN>
Brian G</SPAN>
AK HI MI MN MO NH OK RI TN</SPAN>
J</SPAN>
Harman O</SPAN>
AK HI MI MN MO NH OK RI TN</SPAN>
J</SPAN>
Victoria J</SPAN>
AK HI MI MN MO NH OK RI TN</SPAN>
J</SPAN>
Nigel O</SPAN>
AK HI MI MN MO NH OK RI TN</SPAN>
J</SPAN>
Sue C</SPAN>
TX-NJ AL AR DC GA MS NC VA WV</SPAN>
NJ</SPAN>
Clair R</SPAN>
TX-NJ AL AR DC GA MS NC VA WV</SPAN>
NJ</SPAN>
Becky P</SPAN>
TX-NJ AL AR DC GA MS NC VA WV</SPAN>
NJ</SPAN>
Sierra D</SPAN>
IA IL IN KS KY ND NE NM OH PR SD TX-J WI</SPAN>
NJ</SPAN>
Christopher A</SPAN>
CT DE FL LA MA MD ME NJ NY PA SC VT</SPAN>
NJ</SPAN>
Jack U</SPAN>
CT DE FL LA MA MD ME NJ NY PA SC VT</SPAN>
NJ</SPAN>
John P</SPAN>
AK HI MI MN MO NH OK RI TN</SPAN>
J</SPAN>
David A</SPAN>
AZ CA CO ID MT NV OR UT WA WY </SPAN>
NJ</SPAN>
Sue C</SPAN>
TX-NJ AL AR DC GA MS NC VA WV</SPAN>
J</SPAN>

<TBODY>
</TBODY>


i have to assign out 493 files to 17 names based on the above state groupings they work and if the file is a J or NJ the distribution formula i use is =INDEX($G$5:$G$21,INT(ROWS($E$1:E29)/$H$2)) (H2 is the number of files each rep will recieve in this case 29)

work great evenly distributes 29 to each name just does not first person in each state grouping when there are at least 3 reps working each state grouping.
so it will only assign all 493 to 5 names and i need it assgned to all 17 names

=INDEX($G$5:$G$21,MATCH("*"&C2&"*"&D2,$H$5:$H$21&$I$5:$I$21,0),1)

is there any way to combine these or does anyone know a better way to do the distribution based on the 2 critera where it will assign to all 17 names on the available rep list ?

this is what my sheet looks like any help at all would be GREATLY APPRECIATED
Audit #</SPAN>
Assigned Rep (Assignmment FORMULA)</SPAN>
Org State</SPAN>
J/NJ</SPAN>
index with criteria</SPAN>
index with criteria + Assignment Formula (PROBLEM)</SPAN>
24185502</SPAN>
David A</SPAN>
TN</SPAN>
J</SPAN>
Brian G</SPAN>
INDEX($G$5:$G$21,MATCH("*"&C2&"*"&D2,$H$5:$H$21&$I$5:$I$21,0),INT(ROWS($E$1:E29)/$H$2))</SPAN>
23877157</SPAN>
David A</SPAN>
MN</SPAN>
J</SPAN>
Brian G</SPAN>
David A</SPAN>
30828684</SPAN>
David A</SPAN>
TN</SPAN>
NJ</SPAN>
#N/A</SPAN>
#N/A</SPAN>
20214950</SPAN>
David A</SPAN>
NC</SPAN>
NJ</SPAN>
Sue C</SPAN>
David A</SPAN>
25818650</SPAN>
David A</SPAN>
AZ</SPAN>
NJ</SPAN>
David A</SPAN>
David A</SPAN>
31238014</SPAN>
David A</SPAN>
MI</SPAN>
J</SPAN>
Brian G</SPAN>
David A</SPAN>
15719390</SPAN>
David A</SPAN>
TX</SPAN>
NJ</SPAN>
Sue C</SPAN>
David A</SPAN>
34509249</SPAN>
David A</SPAN>
MO</SPAN>
J</SPAN>
Brian G</SPAN>
David A</SPAN>
19965564</SPAN>
David A</SPAN>
RI</SPAN>
NJ</SPAN>
Brian G</SPAN>
David A</SPAN>
11308717</SPAN>
David A</SPAN>
NH</SPAN>
NJ</SPAN>
Brian G</SPAN>
David A</SPAN>
31083270</SPAN>
David A</SPAN>
WA</SPAN>
J</SPAN>
David A</SPAN>
David A</SPAN>
21448204</SPAN>
David A</SPAN>
UT</SPAN>
NJ</SPAN>
David A</SPAN>
David A</SPAN>
40933141</SPAN>
David A</SPAN>
AL</SPAN>
NJ</SPAN>
Sue C</SPAN>
David A</SPAN>
15448262</SPAN>
David A</SPAN>
MS</SPAN>
NJ</SPAN>
Sue C</SPAN>
David A</SPAN>

<TBODY>
</TBODY>
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Status
Not open for further replies.

Forum statistics

Threads
1,215,212
Messages
6,123,654
Members
449,113
Latest member
Hochanz

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