allocation to user

manojxls

New Member
Joined
Dec 21, 2017
Messages
32
Office Version
  1. 365
  2. 2007
  3. 2003 or older
Platform
  1. Windows
hi,
can you help me to formula or vba to allocate rows to three user equally.

like in column "a" i have some data want to allocate to three users.
suppose if column a having 100 rows each user will get 33, 33 and remain 34.

barcode1user1
barcode2user2
barcode3user3
barcode6user1
barcode5user2
barcode8user3
barcode9
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Assuming you have list of users in column D, column B formula will be:
Excel Formula:
=INDEX($D:$D,MOD(ROW()-1,COUNTA($D:$D))+1)
This will always distribute users equally no matter how many you have.
1704784864479.png
 
Upvote 0
Solution
This will always distribute users equally no matter how many you have.
But it will give very strange results if subsequently any new rows are inserted at the top of the worksheet (eg for headings)
This would be more robust.

24 01 09.xlsm
ABCD
1BarcodeUserUser List
2barcode1user1user1
3barcode2user2user2
4barcode3user3user3
5barcode6user1
6barcode5user2
7barcode8user3
8barcode9user1
Distribute
Cell Formulas
RangeFormula
B2:B8B2=INDEX(D$2:D$4,MOD(ROWS(B$2:B2)-1,3)+1)


If the number of users might change, then this would still distribute as evenly as possible.

24 01 09.xlsm
ABCD
1BarcodeUserUser List
2barcode1user1user1
3barcode2user2user2
4barcode3user3user3
5barcode6user4user4
6barcode5user1
7barcode8user2
8barcode9user3
Distribute (2)
Cell Formulas
RangeFormula
B2:B8B2=INDEX(D$2:D$100,MOD(ROWS(B$2:B2)-1,COUNTA(D$2:D$100))+1)
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

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