VBA Logic to loop through a set of tasks and assign Employees

rksample

New Member
Joined
Oct 13, 2010
Messages
47
Hi Excel Gurus,

I need help with a small VBA logic that can loop through a set of tasks and assign Employees to the tasks.

Process:
  1. I have a set of tasks (Task 1 to Task 10)
  2. I have 3 Employees (John, Ken and Kyle). Everyday I allocate different % of tasks for each employee based on their work load. For e.g
    • John - 70% of tasks
    • Ken - 15% of tasks
    • Kyle - 15% of tasks
  3. I need the macro to loop these tasks and assign John, Ken or Kyle.

Final output will be similar to this:
[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD]Task 1[/TD]
[TD]John[/TD]
[/TR]
[TR]
[TD]Task 2[/TD]
[TD]John[/TD]
[/TR]
[TR]
[TD]Task 3[/TD]
[TD]John[/TD]
[/TR]
[TR]
[TD]Task 4[/TD]
[TD]John[/TD]
[/TR]
[TR]
[TD]Task 5[/TD]
[TD]John[/TD]
[/TR]
[TR]
[TD]Task 6[/TD]
[TD]John[/TD]
[/TR]
[TR]
[TD]Task 7[/TD]
[TD]John[/TD]
[/TR]
[TR]
[TD]Task 8[/TD]
[TD]Ken[/TD]
[/TR]
[TR]
[TD]Task 9[/TD]
[TD]Ken[/TD]
[/TR]
[TR]
[TD]Task 10[/TD]
[TD]Kyle[/TD]
[/TR]
</tbody>[/TABLE]

The challenge I have is that the % of allocation changes everyday.

I would be grateful to anyone who can help me with this logic.

Thanks in advance,

cheers,
Ravi.
[TABLE="width: 132"]
<tbody>[TR]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi,

Why challenge? Use accumulation!

Even if you use %'s such as 52.3%, you can still use the Round() function.

Regards//
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,996
Members
452,373
Latest member
TimReeks

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