theboyscout
New Member
- Joined
- Nov 29, 2012
- Messages
- 26
[TABLE="width: 389"]
<tbody>[TR]
[TD]Employee Name[/TD]
[TD]Title[/TD]
[TD]Salary[/TD]
[TD]max sales[/TD]
[TD]min sales[/TD]
[/TR]
[TR]
[TD]Archie Moody[/TD]
[TD]TI[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]327[/TD]
[TD="align: right"]96[/TD]
[/TR]
[TR]
[TD]Dixie Daniels[/TD]
[TD]T3[/TD]
[TD="align: right"]35[/TD]
[TD="align: right"]170[/TD]
[TD="align: right"]109[/TD]
[/TR]
[TR]
[TD]Jennifer Palmer[/TD]
[TD]T5[/TD]
[TD="align: right"]16[/TD]
[TD="align: right"]320[/TD]
[TD="align: right"]317[/TD]
[/TR]
[TR]
[TD]Camille Ortega[/TD]
[TD]T3[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]257[/TD]
[TD="align: right"]213[/TD]
[/TR]
[TR]
[TD]Arlene Carr[/TD]
[TD]T2[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]289[/TD]
[TD="align: right"]240[/TD]
[/TR]
[TR]
[TD]Neil Mills[/TD]
[TD]T1[/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]352[/TD]
[TD="align: right"]116[/TD]
[/TR]
[TR]
[TD]Terri Bridges[/TD]
[TD]T4[/TD]
[TD="align: right"]38[/TD]
[TD="align: right"]172[/TD]
[TD="align: right"]110[/TD]
[/TR]
[TR]
[TD]Terrell Cortez[/TD]
[TD]T1[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]292[/TD]
[TD="align: right"]105[/TD]
[/TR]
[TR]
[TD]Pamela Cole[/TD]
[TD]T2[/TD]
[TD="align: right"]28[/TD]
[TD="align: right"]262[/TD]
[TD="align: right"]122[/TD]
[/TR]
[TR]
[TD]Charlie Newman[/TD]
[TD]T5[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]170[/TD]
[TD="align: right"]125[/TD]
[/TR]
</tbody>[/TABLE]
Above is a list of employees that I would like a macro that would select the best employee from the list based on the following criteria:
I want the employees that combine to make the most sales, only one employee can be selected from each title and the combined salaries of all 5 titles cannot exceed 100
<tbody>[TR]
[TD]Employee Name[/TD]
[TD]Title[/TD]
[TD]Salary[/TD]
[TD]max sales[/TD]
[TD]min sales[/TD]
[/TR]
[TR]
[TD]Archie Moody[/TD]
[TD]TI[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]327[/TD]
[TD="align: right"]96[/TD]
[/TR]
[TR]
[TD]Dixie Daniels[/TD]
[TD]T3[/TD]
[TD="align: right"]35[/TD]
[TD="align: right"]170[/TD]
[TD="align: right"]109[/TD]
[/TR]
[TR]
[TD]Jennifer Palmer[/TD]
[TD]T5[/TD]
[TD="align: right"]16[/TD]
[TD="align: right"]320[/TD]
[TD="align: right"]317[/TD]
[/TR]
[TR]
[TD]Camille Ortega[/TD]
[TD]T3[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]257[/TD]
[TD="align: right"]213[/TD]
[/TR]
[TR]
[TD]Arlene Carr[/TD]
[TD]T2[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]289[/TD]
[TD="align: right"]240[/TD]
[/TR]
[TR]
[TD]Neil Mills[/TD]
[TD]T1[/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]352[/TD]
[TD="align: right"]116[/TD]
[/TR]
[TR]
[TD]Terri Bridges[/TD]
[TD]T4[/TD]
[TD="align: right"]38[/TD]
[TD="align: right"]172[/TD]
[TD="align: right"]110[/TD]
[/TR]
[TR]
[TD]Terrell Cortez[/TD]
[TD]T1[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]292[/TD]
[TD="align: right"]105[/TD]
[/TR]
[TR]
[TD]Pamela Cole[/TD]
[TD]T2[/TD]
[TD="align: right"]28[/TD]
[TD="align: right"]262[/TD]
[TD="align: right"]122[/TD]
[/TR]
[TR]
[TD]Charlie Newman[/TD]
[TD]T5[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]170[/TD]
[TD="align: right"]125[/TD]
[/TR]
</tbody>[/TABLE]
Above is a list of employees that I would like a macro that would select the best employee from the list based on the following criteria:
I want the employees that combine to make the most sales, only one employee can be selected from each title and the combined salaries of all 5 titles cannot exceed 100