Who inputs the names in table 1 in spreadsheet A in the file?
That is where you get the trouble?
With a pivot table you won't have that problem, since it will that the names of sheet back up.
If those names are writting correct, that will also solve your problem.
See the attached file, where I add a pivot table.
Bookmarks