Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default problem with IF statement


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

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


--
wolfpack95
------------------------------------------------------------------------
wolfpack95's Profile: http://www.excelforum.com/member.php...info&userid=93
View this thread: http://www.excelforum.com/showthread...hreadid=573881

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default problem with IF statement

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


with @tiscali.co.uk


"wolfpack95" wrote
in message ...

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

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


--
wolfpack95
------------------------------------------------------------------------
wolfpack95's Profile:
http://www.excelforum.com/member.php...info&userid=93
View this thread: http://www.excelforum.com/showthread...hreadid=573881



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I'm having a really strange problem with 3 if statements. Marc Excel Worksheet Functions 4 April 5th 06 02:36 PM
If Statement linked to cell with VLOOKUP problem - getting wrong v Mike R. Excel Worksheet Functions 4 January 14th 06 02:16 PM
Fundamental problem with IF statement David F Excel Worksheet Functions 4 May 12th 05 09:34 PM
Formula Problem - If Statement Margie Excel Worksheet Functions 4 April 29th 05 10:07 PM
Excel Display Problem Bill Martin -- (Remove NOSPAM from address) Excel Discussion (Misc queries) 0 April 19th 05 05:25 PM


All times are GMT +1. The time now is 01:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"