Ken,
Not so much a function, but a process.
1) Sort each set of records
2) Give the shorter (fewer) records a named range (nr_short) - be sure the values that match the longer list are in the first column.
3) In an empty column next to matching values in the longer list (assumes equation here is in A1, and matching values are in B1)
A1 = VLOOKUP(B1,nr_short,FALSE)
4) Copy the equation down.
5) Those with matching values will show the value. Those that don't match will show an error
You might want the TRIM() function to remove leading and trailing spaces.
Use Auto Filter to ignore the error rows
Delete the remaining rows
Remove the filter.
Tubal