problem with IF statement

  • Thread starter Thread starter wolfpack95
  • Start date Start date
W

wolfpack95

I am comparing two columns with a IF statement and returning "Yes" i
they're equal and "No" if they're not. However, I'm getting a "No" i
cases where the values are equal. The formula works correctly if
select each cell and press enter. However, my sheet is too long to d
this for every cell.

I believe this is due to concatenating/comparing two text columns and
have seen this issue before but I can't remember the remedy. Thanks fo
any help
 
wolfpack95,

The most likely reason for comparisons failing is that the values only look
the same but are very slightly different. For example if one cell has =1/9
and the other a constant of 0.111111 they will both look the same in the
cell but a test of =A1=A2 will return FALSE because 1/9 is 0.111 recurring.
The answer is to round the data before comparing it as in:

=ROUND(A1,6)=ROUND(A2,6)

--
HTH

Sandy
In Perth, the ancient capital of Scotland

(e-mail address removed)
(e-mail address removed) with @tiscali.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

IF Statement 5
help with my if statement 3
If statement for a range of cells 3
Need help with IF Formula 4
If statement with dates 0
custom function 1
If Statement Error 6
IF/OR Statement 4

Back
Top