LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Junior Member
 
Posts: 2
Default IF statement not returning correct answer

Hello,

I am hoping someone can help me with this. Essentially, I am trying to construct an If statement that will return "OK" or "NO" based on whether one cell is equal to any of another 5. All 6 cells in question are populated via a VLOOKUP function or a calculated formula. All the cells themselves are populated correctly. However, the IF statement is not able to correctly determine whether the one cell matches one of the other five. To put it another way, if M1 is equal to H1, I1, J1, K1, or L1, I want the formula to display "OK", and if M1 does not equal any of those, I want it to display "NO". Sometimes the equation works, but 99% of the time it doesn't. I think it has something to do with how the Vlookup/other formulas are formatting the numbers in the cells that the IF statement is checking--but I can't figure out how. I've told all the cells to format as number decimals with two digits--and the rows where the If statement works seem to be formatted the same as the rows where it doesn't.

I've tried two different IF statements, and both have the same issue. Is something wrong with my formulas, or is this a formating issue?

=IF(OR(M697=H697,M697=I697,M697=J697,M697=K697,M69 7=L697),"OK","NO")

=IF(M693=H693,"OK",IF(M693=I693,"OK",IF(M693=J693, "OK",IF(M693=K693,"OK",IF(M693=L693,"OK","NO") ))))

Thank you very much for your help.
 
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
Getting the correct SUM answer txheart Excel Discussion (Misc queries) 1 April 18th 08 07:05 PM
vlookup if statement returning a "false" answer. inthestands Excel Worksheet Functions 2 September 20th 07 11:36 PM
Won't give correct answer Loren Excel Worksheet Functions 4 January 5th 07 06:49 PM
Finding Correct Answer caldog Excel Worksheet Functions 0 November 25th 06 07:58 PM
VLOOKUP not returning correct answer Alan Davies Excel Worksheet Functions 3 May 10th 06 03:37 PM


All times are GMT +1. The time now is 05:48 PM.

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

About Us

"It's about Microsoft Excel"