ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Repeat Range for select Records (https://www.excelbanter.com/excel-programming/427930-repeat-range-select-records.html)

Luce

Repeat Range for select Records
 
Hi Excel Experts,
I need some guidance on how to logically perform this task through a macro.
I have a schedule that identifies the following info:

Column A - Available # Reps
Column B - Rep Assigned (this is wrong and is what I need the macro to fix)
Column C - Group
(See sample below)

(A) (B) (C)
Avail# Rep Group
of Reps
------------------------------------
3 Amy A1
3 Amy A1
3 Amy A1
3 Amy A1
3 Amy A1
3 Amy A1
2 Jim B1
2 Jim B1
2 Jim B1
2 Jim B1

I have to re-assign the rep in column B so that the Group is evenly split
out among the available reps (as numbered in Column A). For example, since I
have 3 available reps for Group A1's (6) records, each rep can have 2
records for Group A1.

I have a tab that lists the names of the valid reps available for each
Group. I need to use the data on this template to re-assign the reps above
equally.

Avail Rep Group
--------------------
Amy A1
Jen A1
Sue A1
Bob B1
Jack B1

I have tried numerous approaches and I cannot seem to get it to work
correctly. My Do Loops are all messed up and have been unsuccessful in
applying the patterns I want. Please help.


All times are GMT +1. The time now is 06:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com