PDA

View Full Version : Dividing data records fairly into clients based on categories and amounts



mzohdy
08-25-2017, 04:55 PM
Hello guys, Actually i want to use Excel Macro VBA to divide many records into 36 person based on two columns one of them contains categories and the other contains amounts negative and positive in order to make each person get the same count of category and approximately the same amount.
Please help me in this algorithm urgent ASAP.


Thanks in Advance.

20181

YasserKhalil
08-25-2017, 10:32 PM
Hello mzohdy
It is better to upload sample of your workbook (Go Advanced / Manage Attachments) with some of your expected output
Regards

mzohdy
08-26-2017, 03:34 AM
Hello Yasser
20183

Please find attached the excel sheet that contains the row data and i need your support to tell me the algorithm that makes me divide the data into 36 salesman in order that each one should have the same count of data and the same count of ARPA categories and the same sum of Average May & July

Thanks in advance

mana
08-26-2017, 04:21 AM
Why?
Column A: only "A"
Column D: no data

mzohdy
08-26-2017, 04:52 AM
Yes Mana, i do not want column A its just to count and Column D is the one need to be filled by salesman from 1 to 36 as what i need is to divide this data into 36 salesman in order to make each one take the same count of ARPA categories (1200-2000, 2500-3000) and so on and to make each one take the same total of average may and July.

Thanks for help.

YasserKhalil
08-26-2017, 06:37 AM
Hello mzohdy
It is still unclear. Please post some of your expected results and I don't know where are the names of sales persons?

mzohdy
08-26-2017, 06:43 AM
Hello Yasser,

There is no salesman name i want to add them (sales_1, sales2, Sales3 and so on) and i want to add them in order to divide this data equally between them to make each one take the same amount of ARPA categoires column and to make each one of them take the same total sum of Average May and July column in the same time.
And i can't find any algorithm for it in my mind and i need someone to think with me that have more experience in these matters.
Please if you have any idea for this algorithm support me.

Thanks

mana
08-26-2017, 06:46 AM
Knapsack problem?
Sorry, too difficult for me.

mzohdy
08-26-2017, 07:04 AM
Thanks mana but i think that its not a knapsack problem

YasserKhalil
08-26-2017, 08:21 AM
Believe me that will be easier if you put some expected output ... I think Mana is able to do even more difficult than that issue but the problem is that you are unclear (at least for me)

mzohdy
08-26-2017, 09:03 AM
Thanks Yasser, The expected output is to make a column beside this data written in it from Sales_1 to Sales_36 but to be added fairly between them in order to make each one of the 36 salesman got the same count of ARPA categories and the same total amount of Average May and July
Noting that ARPA have 13 categories not shown in the screenshot like (1200-1500), (1500-1800), (1800-2100) and so on
I will be glad if you find a slution.