Forum Discussion

dantegarzia's avatar
dantegarzia
Copper Contributor
Apr 26, 2024

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

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum 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.

     

    • dantegarzia's avatar
      dantegarzia
      Copper 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

Resources