Compare two cells from reference cells
TRIM will removing leading and trailing spaces. Another common cause of
failure to match is a difference between a number (123) and a string
representation of that number ("123"). TRIM will also convert the number to
its equivalent string; VALUE will convert a string of digits to its numeric
equivalent.
"Mike K" wrote:
Oh wise ones,
I have two cells that I am comparing. The values come from an array
function that is pulled from a sql server, so the reference cells are not
very editable. Lets call them A1 and A2. I refer to them in B1 and B2 where I
compare them for equality. They look identical, but they do not compare as
true so there must be some leading/trailing spaces. How can I take out the
spaces from B1 and B2 so they compare properly?
Thanks,
Mike
|