Excel VBA spreadsheet Built

Hello - I need an excel spreadsheet built using developer functions. I cant seem to get it correct.

I have the code from another website which is built to do precisely what I am after.

I want to use excel to generate every permutation/combination of a list of 10-20 golfer names. The purpose of doing so is for mass entering daily fantasy pga contests.

My goal is to assign a pool of 10-20 hand selected players and use excel to create the lineups.

The constraints of the lineups are as follows:

Each lineup has $50,000 in "salary" to be used. You can not go over this salary, but obviously you can stay under the 50k limit.

Golfers are assigned there own salary, generally ranging anywhere from $5500 to $13000 depending on that weeks pga tournament and strength of field.

Each lineup consists of 6 golfers, which again add to or remain under the 50k cap.

Here would be a hypothetical list of my favorite players and their salaries:

Rory McIlroy $13,000

Jordan Spieth $12,600

Jason Day $10,100

Justin Rose $10,000

Louis Oosthuizen $9,600

Sergio Garcia $9,100

Henrik Stenson $9,000

Brooks Koepka $8,000

Charl Schwartzel $7,800

Tiger Woods $7,500

Branden Grace $7,300

Danny Lee $7,000

Robert Streb $6,400

Cameron Percy $5,900

Matt Jones $5,800

John Daly $5,500

Obviously this is going to result in a TON of combinations lol, and only lineups using around $49,500 in salary would be of any use. After running the program, I would then have to go through the file and hand select the generated lineups I like. Until I can find a better way of generating preferred exposure rates of players, uploading personal fantasy point projections (assembled in a whole different spreadsheet / for another time) which would basically be a "lineup optimizer".

For now I am just interested in figuring out how to use excel to run each possible combinations of a list of names and staying within the salary constraints. I realize this is probably a very big task, and may be a bit advanced for the excel noob I am, but I have the time to learn and think a project as such is the best way for me to learn excel and have fun with my hobby.

Thanks guys, I hope the explanation is clear and that we can work something out!

Can you turn this code into a functioning spreadsheet that I can download and use?

Code here:

Sub test()

i = 1

For player_1 = 0 To 1

For player_2 = 0 To 1

For player_3 = 0 To 1

For player_4 = 0 To 1

For player_5 = 0 To 1

For player_6 = 0 To 1

For player_7 = 0 To 1

For player_8 = 0 To 1

For player_9 = 0 To 1

For player_10 = 0 To 1

For player_11 = 0 To 1

For player_12 = 0 To 1

For player_13 = 0 To 1

For player_14 = 0 To 1

For player_15 = 0 To 1

For player_16 = 0 To 1

If player_1 + player_2 + player_3 + player_4 + player_5 + player_6 + player_7 + player_8 + player_9 + player_10 + player_11 + player_12 + player_13 + player_14 + player_15 + player_16 = 6 Then

Total = player_1 * Cells(1, 2) + player_2 * Cells(2, 2) + player_3 * Cells(3, 2) + player_4 * Cells(4, 2) + player_5 * Cells(5, 2) + player_6 * Cells(6, 2) + player_7 * Cells(7, 2) + player_8 * Cells(8, 2) + player_9 * Cells(9, 2) + player_10 * Cells(10, 2) + player_11 * Cells(11, 2) + player_12 * Cells(12, 2) + player_13 * Cells(13, 2) + player_14 * Cells(14, 2) + player_15 * Cells(15, 2) + player_16 * Cells(16, 2)

If Total <= 50000 And Total > 45000 Then

Cells(1, i + 3) = player_1

Cells(2, i + 3) = player_2

Cells(3, i + 3) = player_3

Cells(4, i + 3) = player_4

Cells(5, i + 3) = player_5

Cells(6, i + 3) = player_6

Cells(7, i + 3) = player_7

Cells(8, i + 3) = player_8

Cells(9, i + 3) = player_9

Cells(10, i + 3) = player_10

Cells(11, i + 3) = player_11

Cells(12, i + 3) = player_12

Cells(13, i + 3) = player_13

Cells(14, i + 3) = player_14

Cells(15, i + 3) = player_15

Cells(16, i + 3) = player_16

Cells(17, i + 3) = Total

i = i + 1

End If

End If

Next Next Next Next Next Next Next Next Next Next Next Next Next Next Next Next

End Sub

Skills: Excel, Visual Basic, Data Entry, Data Processing, Web Scraping

See more: excel vba error, excel vba add installation, excel vba xml post, port excel vba spreadsheet website, display running time macro excel vba, excel vba open spreadsheet start macro, running excel vba access, vba excel manipulating spreadsheet, running excel vba macro sql server, excel vba refresh spreadsheet, excel vba copy website spreadsheet, excel vba query spreadsheet, excel vba sum column spreadsheet, excel vba pull pdf spreadsheet, excel vba running total column, excel vba running total, excel vba macro spreadsheet, excel vba spreadsheet, excel vba user form link spreadsheet

About the Employer:
( 0 reviews ) Elkhart, United States

Project ID: #23499143

Awarded to:


Hello sir. I am Vb expert and have much experience. Just reading your proposal, i am confident perfect result. I will work for u faithfully. Looking for your reply. Thank u.

$100 USD in 7 days
(2 Reviews)

13 freelancers are bidding on average $157 for this job


Hello, I can help you with your project - Excel VBA spreadsheet Built I have gone through your job posting and become very much interested to work with you. I am an expert in this field. I have already completed sev More

$240 USD in 4 days
(369 Reviews)

Hi there, I am scraping expert, I have did more than 500+ scraping project, please check my feedback then you will know. Can we discuss more details about this project? then I will provide example data/script for you More

$160 USD in 5 days
(333 Reviews)

Hello! i can help you with this permutations code. I am available. You will not be dissapointed, I have a big 31% rehire rate. Thank you!

$200 USD in 2 days
(315 Reviews)

Dear Employer, Yes I understand your requirement. Basically you need to select the players who can be adjusted in the total salary range of 50K usd based on their individual salaries. I will give you a tool in which y More

$250 USD in 3 days
(227 Reviews)

Hello, I am a dedicated and hard working person who believes in honesty and good working relation. I am an experienced in data entry and excel works from last 5+ years. I look forward to hear from you soon. Thank you!

$195 USD in 3 days
(50 Reviews)

Hi, I have understand the project requirement & interested to work for this project. Please send a message so we can discuss more & start the project. Thanks.

$150 USD in 1 day
(99 Reviews)

I'm happy to work Relevant Skills and Experience Happy to work

$155 USD in 3 days
(0 Reviews)

* * * * * * * * * * * * 100% satisfied customers * * * * * * * * * * * read your project requirements. found myself to be suitable for this as will complete this is minimum time possible along with lowest price gurant More

$180 USD in 3 days
(0 Reviews)

Hello I am a full time freelancer and Excel VBA expert. I have rich experiences for scraping data using Excel VBA So I can complete your project perfectly on time. Please send me message so that we can discuss more an More

$155 USD in 7 days
(0 Reviews)

Hello How are you? I've read carefully your job description. I have more than five years experience in Excel VBA and Algorithm Your satisfaction with the project is my top priority! If you give me a chance to work wit More

$35 USD in 3 days
(0 Reviews)

Hello sir/ma, I'm interested in taking this task up for you. I'm a professional and also have good command over MS Excel especially pivot table, charts, advanced formulas, formatting, Excel VBA, R Programming Language More

$30 USD in 1 day
(0 Reviews)

Hi I hope you are doing well. We have been working with python and related projects since the last 7 years. Me and my team have experience with Tensorflow, PyTorch, Django, Kivy, NumPy and some other libraries and fram More

$190 USD in 5 days
(0 Reviews)