SanFelippo
Board Regular
- Joined
- Apr 4, 2017
- Messages
- 124
Hello Friends,
This is a bit of a tricky one to do in excel, as it involves some Operations Research (if anyone has ever taken that class in college).
I have a list of People or "Items" if you will. In the next column I have their strengths, let's say they are either Offensive or Defensive. Then in the next two columns, I have the times that they are available (it runs from 0 - 24, so someone could be available from say 7 - 19, or someone could be available from 20 - 6, or 6 - 13, etc).
I have included a table below to show what I mean.
Anyway, the idea is this. Each Person on this list has their own "account." Ideally I want each account to have the full scale of time ranges covered (0 - 24). This involves having people merge accounts, but I would want to make sure that the two (or three people if needed) who merge their accounts have at least 1 person who's strength is "Offensive" and one who's strength is "Defensive."
Example:
So if I were to have an "Offensive" Player who was available from 7 - 19, I would want to pair them with one or two other people of whom at least one would be "Defensive" who would be available for the missing time of 20 - 6. Say I have a "Defensive" player who is available from 20 - 6. They would then merge their accounts, and both play on the same account, one covering the time range from 7 - 19, and the other would cover the time range from 20 - 6.
It is going to be impossible probably to get every account to be covered for the full 24 hours, but I would like to get as close as possible. I would say the limit of players on one account is 3 total. Overlap of times is okay as well, so if you had two players, one who played 4 - 16 and one who played 13 - 5 who were Offensive and Defensive respectively, it would be okay to pair them together.
Below would be an example of what my data would look like:
<tbody>
</tbody>
I don't know if it is exactly possible to write code to do this (either in regular excel using formulas or with VBA). If this doesn't seem like something that can be done, or it is something one of you knows can't be done, just go ahead and say that haha.
I don't need this to actually go ahead and merge the accounts, I would just like it to maybe show in the next column or two the potential matches each person would have.
This is a bit of a tricky one to do in excel, as it involves some Operations Research (if anyone has ever taken that class in college).
I have a list of People or "Items" if you will. In the next column I have their strengths, let's say they are either Offensive or Defensive. Then in the next two columns, I have the times that they are available (it runs from 0 - 24, so someone could be available from say 7 - 19, or someone could be available from 20 - 6, or 6 - 13, etc).
I have included a table below to show what I mean.
Anyway, the idea is this. Each Person on this list has their own "account." Ideally I want each account to have the full scale of time ranges covered (0 - 24). This involves having people merge accounts, but I would want to make sure that the two (or three people if needed) who merge their accounts have at least 1 person who's strength is "Offensive" and one who's strength is "Defensive."
Example:
So if I were to have an "Offensive" Player who was available from 7 - 19, I would want to pair them with one or two other people of whom at least one would be "Defensive" who would be available for the missing time of 20 - 6. Say I have a "Defensive" player who is available from 20 - 6. They would then merge their accounts, and both play on the same account, one covering the time range from 7 - 19, and the other would cover the time range from 20 - 6.
It is going to be impossible probably to get every account to be covered for the full 24 hours, but I would like to get as close as possible. I would say the limit of players on one account is 3 total. Overlap of times is okay as well, so if you had two players, one who played 4 - 16 and one who played 13 - 5 who were Offensive and Defensive respectively, it would be okay to pair them together.
Below would be an example of what my data would look like:
Player | Strength | Time Start | Time Finished |
A | Offensive | 0 | 18 |
B | Offensive | 5 | 20 |
C | Defensive | 4 | 17 |
D | Defensive | 23 | 9 |
E | Defensive | 19 | 10 |
F | Offensive | 16 | 4 |
G | Defensive | 12 | 24 |
H | Offensive | 23 | 12 |
etc. | etc. | etc. | etc. |
<tbody>
</tbody>
I don't know if it is exactly possible to write code to do this (either in regular excel using formulas or with VBA). If this doesn't seem like something that can be done, or it is something one of you knows can't be done, just go ahead and say that haha.
I don't need this to actually go ahead and merge the accounts, I would just like it to maybe show in the next column or two the potential matches each person would have.