B
BKing
Hi, I could use some assistance with code that makes
assignments based on a priority in one group with a
ranking in another group.
I have master 2 lists, people and items.
The people contains: Name, experience, priority1,
priority2, priority3.
The items list contains: Name, ranking.
On a separate daily task worksheet assignments need to be
made to the items that are available with the people that
are available. The items available and people available
can be different each day.
The items can be in one or more of the three priorities,
and the items ranking may not be unique.
However, as soon the logic is hit, don't consider that
person or item again.
The order for assignments is, check priority1 for all
people available, then priority2, then priority3. If the
item is found under a persons priority, assign the item to
them on the daily task sheet and do not consider them for
any other items, or that item for any other person.
If the item is not found in one of the 3 priorities,
assign the highest ranked item (1 is highest) to the most
experienced person (highest number is the most). Don't
consider that person or item again.
If the item is still not assigned, return unassigned.
e.g.
People:
Name=Name1
Experience=6
priority1= Carrots
priority2=Grapes
priority3=Grapefruit
Name=Name2
Experience=5
priority1= Squash
priority2=Apples
priority3=Bananas
Name=Name3
Experience=6
priority1= Apples
priority2=Squash
priority3= Tomatoes
Items
Name=Apples
Ranking=1
Name=Grapes
Ranking=1
Name=Oranges
Ranking=3
Name=Tomatoes
Ranking=2
Name=Watermelon
Ranking=6
Using the above people and items if apples, tomatoes,
oranges and watermelon are available
Apples are assigned to Name3. (Found first it priority1)
Tomatoes are assigned to Name1 (most experiences, highest
ranking)
Oranges are assigned to Name2 (next most experienced, next
highest ranking)
Watermelon is "unassigned"
Thanks, if you are sill here.
assignments based on a priority in one group with a
ranking in another group.
I have master 2 lists, people and items.
The people contains: Name, experience, priority1,
priority2, priority3.
The items list contains: Name, ranking.
On a separate daily task worksheet assignments need to be
made to the items that are available with the people that
are available. The items available and people available
can be different each day.
The items can be in one or more of the three priorities,
and the items ranking may not be unique.
However, as soon the logic is hit, don't consider that
person or item again.
The order for assignments is, check priority1 for all
people available, then priority2, then priority3. If the
item is found under a persons priority, assign the item to
them on the daily task sheet and do not consider them for
any other items, or that item for any other person.
If the item is not found in one of the 3 priorities,
assign the highest ranked item (1 is highest) to the most
experienced person (highest number is the most). Don't
consider that person or item again.
If the item is still not assigned, return unassigned.
e.g.
People:
Name=Name1
Experience=6
priority1= Carrots
priority2=Grapes
priority3=Grapefruit
Name=Name2
Experience=5
priority1= Squash
priority2=Apples
priority3=Bananas
Name=Name3
Experience=6
priority1= Apples
priority2=Squash
priority3= Tomatoes
Items
Name=Apples
Ranking=1
Name=Grapes
Ranking=1
Name=Oranges
Ranking=3
Name=Tomatoes
Ranking=2
Name=Watermelon
Ranking=6
Using the above people and items if apples, tomatoes,
oranges and watermelon are available
Apples are assigned to Name3. (Found first it priority1)
Tomatoes are assigned to Name1 (most experiences, highest
ranking)
Oranges are assigned to Name2 (next most experienced, next
highest ranking)
Watermelon is "unassigned"
Thanks, if you are sill here.