Hi Jindon,
Thanks for your reply.
I am using it in a gale shapley (stable marriage) matching algorithm and in summary I am matching A Man and preferences of Women to A Woman and preferences of Men , my current macro works well, but only when there are equal numbers in my 2 arrays.
The full problem that I am trying to solve is to be able to enter:
a list of men with their preferences on sheet 1,
a list of Women with their preferences on sheet 2
and then results populate on sheet 3.
It is ok if some don't have a match, but I need my code to be able to keep moving even if there are e.g 15 men all with different numbers of preferences to 80 women with different numbers of preferences.
my complete code is:
I have attached my spreadsheet with the macro - Matching1.xlsm and the spreadsheet of how I want it to work - MatchingGoal.xlsm
And I have another thread about the full problem at:
Bookmarks