Forum Discussion
Formula returning the incorrect value
I am trying to lookup the value in cell A2 in column H and return a Yes if that value is in Column H and a No if it is not. I have tried using the below formulas, but it keeps returning "No" on values I can clearly see are in Column H. I have tried to change the formatting of both columns, but still no luck.
=IF(COUNTIF(H:H,A2)>0,"Yes","No")
=IF(ISNUMBER(MATCH(A2,H:H,0)),"Yes","No")
10 Replies
- Detlef_LewinSilver Contributor
- Riny_van_EekelenPlatinum Contributor
dantegarzia Can you show what you have in A2 and column H? Looks may deceive and what you see as same values may be seen by Excel as different values.
- dantegarziaCopper Contributor
Riny_van_Eekelen This is what the data looks like using the IF COUNTIF formula I mentioned. As you can see it returns no, even though that value is in column H
- Riny_van_EekelenPlatinum Contributor
dantegarzia Enter this in an empty cell:
=A10=H14 (assuming these are the cell that you marked in yellow)
What do you get?