need a search/find/lookup function

J

Jenn

I need a function to determine if value "A" exists in range B1:B10. If A
exists in B1:B10, return "C". If A doesn't exist in B1:B10, return "D."

I have tried using lookup, I've tried index and match, I've tried
search/find. I can't make any of those do what I want it to.
 
R

Ron Rosenfeld

I need a function to determine if value "A" exists in range B1:B10. If A
exists in B1:B10, return "C". If A doesn't exist in B1:B10, return "D."

I have tried using lookup, I've tried index and match, I've tried
search/find. I can't make any of those do what I want it to.

Case insensitive:
=IF(COUNTIF(B1:B10,"*A*"),"C","D")

Case sensitive:
=IF(SUMPRODUCT(--ISNUMBER(FIND("A",B1:B10))),"C","D")

--ron
 
M

Ms-Exl-Learner

=IF(COUNTIF(B2:B11,"A")>=1,"C","D")

OR

=IF(ISNA(VLOOKUP("A",B2:B11,1,FALSE)),"D",IF(VLOOKUP("A",B2:B11,1,FALSE)="A","C","D"))

OR

=IF(ISNUMBER(MATCH("A",B2:B11,0)),"C","D")


Remember to Click Yes, if this post helps!
 

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

Top