View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Duke Carey Duke Carey is offline
external usenet poster
 
Posts: 1,081
Default Help - cannot compare values properly even though they display sam

Select the cell with the =PISampDat($D$1,$B$5,$B$748,"1h", 0) formula
Press the F2 key, then the F9 key. Does the result EXACTLY match your
WT_STEDY string, or is there a leading/trailing space(s)

"Tommy" wrote:

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