View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default incorrect output of if formula

Check whether there is a space in one of the cells

Try the below..If it works then there is a space in one of the cells
=IF(TRIM(A1)=TRIM(A2),"yes","no")

or try
=CODE(A1)
If it returns a number insteadof #value there is a character there in one of
the cell.

If this post helps click Yes
---------------
Jacob Skaria


"Seeker" wrote:

I have two cells with values which were macro auto copied from other cells by
copy - paste special €“ value, I have a =if(A1=A2,"yes","no") formula in third
cell to compare these two cells. From time to time the output of formula
gives inccorrect answer, but if I copy the first cell to the second cell
again manually using copy €“ paste function, the third cell gives the right
answer. Any idea why and how to correct this please?
Rgds