Mixed Comparison Formula
In looking at your screen shot, and understanding that you have columns J and L formatted as General, it appears that J3 is being treated as a Number (check to see what the indicator says if you click the green triangle in upper left corner of J3 - a yellow diamond will appear that you can click to see what the 'problem' is). Meanwhile, it appears that what has been placed into L3 is being being treated as Text.
Since your values can be either 'pure' numbers as "1234" or alpha-numeric entries as "a1234" or "12a44-66c" both cells that you carry out these tests against should be formatted as TEXT, not General.
Note that if you format the entire column as Text, as you try to add formulas into cells later, the formula will show up as the content, not the results. You'll have to change the format of those cells to General, enter the formula, change back to Text.
But this solution may work for both General/Text or one column one way, the other in the other format. See my screen shot.
Notice that I have a number being compared to a text entry representing that same number. Your test (column M) shows that they are different, but my modification of that formula in N3 comes up with the expected result!! N2 shows what the formula in N3 is (as does M2 for M3).
It may be hard to read in the screen shot, so I'll repeat it here, using periods to provide some spacing between the characters - there are NO periods/dots in the actual formula.
so the important section of each for the change is
in front of the cell references. What that's doing, in effect, is converting both to text for the comparison testing regardless of what Excel thinks they are when it looks at the values in the cells themselves.
Hope this helps some.--
...then THINK! again.