View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Tommy[_4_] Tommy[_4_] is offline
external usenet poster
 
Posts: 20
Default Help - cannot compare values properly even though they display same thing!

I have a simple IF statement that compares the values of two cells:
=IF(D5=G5,"Good","Bad"). Simple enough. The problem is that even when
the value of the cell is exactly the same i.e both D5 and G5 show
"WT_STEDY", it is still returning "Bad". I did a little bit of error
checking: trimmed both cells to ensure no rogue spaces were there etc.
The difference lies in the formula bar. For cell G5, the bar
shows:"WT_STEDY" whereas for cell D5 it shows "=PISampDat($D$1,$B$5,$B
$748,"1h", 0)" which is call from a database. How do I change my
original IF statement to compare the actual strings output / displayed
in the two cells?? I don't mind using some VB, but I'd rather not
because the problem seems so trivial.

Regards,

Tom