VBA - Create potential combination of users based on a list and two conditions

totove

New Member
Joined
Sep 6, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am struggling to write a VBA algorithm.
  • Input:
    • list of users (name and country)
    • List of historical pair of users (month, Person 1 and his country, Person 2 and his country)
  • Output:
    • combination of possible pair of users.
  • Condition
    • two users composing a pair should not have the same country
    • a pair cannot be composed by two users who were selected together in the past.
See attached picture. Any idea how to do that in VBA? Thank you very much!

1662471767488.png
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,214,394
Messages
6,119,263
Members
448,881
Latest member
Faxgirl

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