OK, so let's think about this.
I was able to come up with an array formula that will bring you back a list of matching items, but with 1500 rows, this will be a heck of a calculation (several seconds each recalc) to have.
You can view/download my sample workbook here:
https://1drv.ms/x/s!AtJ-3Lle_YMHgcR_R2ugY-iV0NXYVg
I created two independent lists in columns A and C, 1500 rows each, with a random 3-letter code (simulating your names). This has ~15,600 possible permutations. Of these, 135 match in both columns (roughly what you would expect, give or take). I also created in columns B and D some random values to calculate.
Now, in range H2:H136 (because I have 135 matches + header), I enter this array formula and press Ctrl+Shift+Enter:
Code:
=IFERROR(INDEX($A$1:$A$1500, LARGE(ROW($1:$1500)*ISNUMBER(MATCH($A$1:$A$1500, $C$1:$C$1500, 0)), ROW($1:$135))), "")
This gives me a list of matching values. In I2:I136 (add a row to account for header), I enter this:
Code:
=VLOOKUP($H2, $A$1:$B$1500, 2, FALSE)
...and copy down. Similarly, in J2, I enter this:
Code:
=VLOOKUP($H2, $C$1:$D$1500, 2, FALSE)
...and copy down.
Finally, in K2:K136, I calculate the variance:
...and copy down.
Each recalc of the sheet (with no other sheets, or other workbooks opened) takes about 4 seconds on my machine (Win10, Office 365 64-bit, AMD A12-9720P Radeon R7, quad-core 2.7 GHz, 8GB RAM).
This will automate majority of the process for you, except you will need to update the size of the array any time the source data changes for the number of matches. In my situation, I had 135, and avoided using any dynamic calculations to speed up calculations (e.g. no ROW(INDIRECT()), etc). You can certainly incorporate those dynamics, but it will slow down the process. To determine the number of matches, I used this calculation (in cell F1):
Code:
=SUMPRODUCT(--ISNUMBER(MATCH($A$1:$A$1500, $C$1:$C$1500, 0)))
To use this, consider the following:
* You have to use a multi-cell array formula to get the list of matching names
* If your amount of matches is significantly higher than my 135 out of 1500 (~9%), the calculation times may get crazier
* You can sort the lists (A1:B1500 and C1:D1500) and then use exact MATCH() and VLOOKUP(). This will speed up the calculations dramatically, but requires that you be able to sort the lists in ascending order - and not forget this step each time you update.
* You can turn off automatic calculations while updating, which will let you make any necessary edits, then recalculate once, each time you need to update.
All that said - is this the output you are looking for? If yes, how do you feel about this solution? If no, what did I miss?
Please post back with feedback and/or questions.