Hi All & to anyone that can help!
I am somewhat of an excel novice and not too familiar with VBA's (Macro's) however I do know I need one and the logic behind what I am am trying to achieve..... so any help will be greatly appreciated.
I have a data table I wish to paste in each time I run the macro. It has x3 columns and is normally no more than 30 lines. (I have made up a table here for example)
The first step would be: combinations of Names that result in a probability with a value less than 26, when multiplied. This is needed for combinations of 2 names, then 3 names and 4 names.
Ie
2: James & Bob
3.James, Bob, Katryna
& so on.
Now once the different permutations have been produced, from those permutations split into combinations of 2,3 & 4, of these combinations, which returns the high sum of returns when added together.
So when I paste the data in, when the macro is ran, I am wishing for the output to allow me to chose which name combination allows me to maximise my returns the most when combined the probability is less than the value of 26. (So probability is being multiplied & returns is the sum of)
Generating something like
2: James & Bob : $32.5
3.James, Bob, Katryna: $42.5
-------------------------------------
3.James, Bob, Alison: $40.5 X (so although this is viable, the sum of another combination is less so I don't want it returning)
Thank you to anyone that can help
I am somewhat of an excel novice and not too familiar with VBA's (Macro's) however I do know I need one and the logic behind what I am am trying to achieve..... so any help will be greatly appreciated.
I have a data table I wish to paste in each time I run the macro. It has x3 columns and is normally no more than 30 lines. (I have made up a table here for example)
Name | Probability | Return $ |
James | 3.2 | 20 |
Bob | 2.5 | 12.5 |
Stacey | 8.9 | 5.8 |
Kevin | 7 | 7.6 |
Thomas | 7 | 7.6 |
Ellie | 1.10 | 5.6 |
Katryna | 1.2 | 10 |
Alison | 1.2 | 8 |
The first step would be: combinations of Names that result in a probability with a value less than 26, when multiplied. This is needed for combinations of 2 names, then 3 names and 4 names.
Ie
2: James & Bob
3.James, Bob, Katryna
& so on.
Now once the different permutations have been produced, from those permutations split into combinations of 2,3 & 4, of these combinations, which returns the high sum of returns when added together.
So when I paste the data in, when the macro is ran, I am wishing for the output to allow me to chose which name combination allows me to maximise my returns the most when combined the probability is less than the value of 26. (So probability is being multiplied & returns is the sum of)
Generating something like
2: James & Bob : $32.5
3.James, Bob, Katryna: $42.5
-------------------------------------
3.James, Bob, Alison: $40.5 X (so although this is viable, the sum of another combination is less so I don't want it returning)
Thank you to anyone that can help