View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Wigi Wigi is offline
external usenet poster
 
Posts: 396
Default Failed Comparison... why?

Not sure if that's the solution, but there is an extra ) in your formula.


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"shelfish" wrote:

Worksheet one....

Cell A1 contains formula: if(B1 = Sheet2!A1), "Yeah!", "Damn!")

Cell B1 contains a concatenation of C1 and D1, a model number and
serial number (ex. 141565). This number was generate by a macro, so
there is no formula in the cell, just the value.

Worksheet two is a database export and A1 DOES contain the same value.
I have verified there are not any leading or trailing spaces and made
sure that the cell format was the same for both...text.

But the formula returns false for some reason.

If I retype the value generated by the macro and hit enter, then it
will return true. If I replace the macro-generated value with a
concatenate formula, it also seems to work just fine. But this is not
an option for me due to the amount of IF statements needed to
correctly pair the model/serial numbers so that they match the values
in sheet 2

Any thoughts on what Excel quirk would cause it to see these two
values as unequal?

Many thanks,
S.