I'm looking for an Excel function, which compares two cells and returns the number of matching characters between those two cells.
I want the function to ignore case, i.e. A = a, B = b, etc.
Example:
A1 = abcdef
and B1 = Afcblm
.. C1 = 4
(number of matching characters = 4 (afcb
)
The function should compare all characters in two cells and then return every character which is present in both cells regardless of the order.
I have created the function below
=SUM(IFERROR(IF(MID(A1, ROW(INDIRECT("$1:$" & LEN(A1))), 1)=MID(B1, ROW(INDIRECT("$1:$" & LEN(B12))), 1), 1, 0), 0))
It does not work when I apply this to above example C1 = 1 and I believe this issue is due to this function comparing characters sequentially.