Pairing Optimal Matches

SanFelippo

Board Regular
Joined
Apr 4, 2017
Messages
124
Hello,

So I have this list of information which you can see below:

aGEonb9.jpg


In this chart I have a list of players (A - S), what their respective strength is, and the time they are able to cover in the time range 0 - 24.

I am trying to figure out if there is a way to get excel (whether through a macro or regular formula) to run through the entire list of players and optimally match up Offensive Players with Defensive Players while at the same time maximizing (getting as close as possible to) covering the entire 24 hour time range.

For example, as you can see in the picture, "Player B" and "Player I" would be a perfect match, as one is Offensive, one is Defensive, and together they would cover the entire 24 hour range. Naturally, once two players have been put together, they would no longer be available as matches for the rest of the list.

I could do this manually, but at some point I could have a list of over 40 or 50 players, so it would get extremely difficult.

Does anyone know of a way to do this?




PHP:
Current Formulas:

F3 = REPT(LEFT($C3), IF($E3 < $D3, OR(F$2<=$E3-1, F$2>=$D3), AND(F$2>=$D3, F$2<=$E3-1)))

F23 = COUNTIF(F$3:F$21,"O")

F24 = COUNTIF(F$3:F$21,"D")
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top