Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

List lookup 2

Status
Not open for further replies.

Blazerdog

Civil/Environmental
Dec 18, 2004
6
I have a list of lets say

a
b
d
j
k
e

I want a function to look on that list and return a positive if the letter I indicate is on the list. An if function would be =if(??="j","x"," ") with ?? being the cell that I put the lookup value in.

I have a list an I want to see an X in a column if there is a a certain value in that column.

I hope this makes sense.
 
Replies continue below

Recommended for you

If your lookup value is in cell A1, and your list is in the range "list", then:
=MATCH(A1,list,0)
will return a row number if A1 is in the list, or #NA# if not.

Wrap that in IFERROR():
=IFERROR(MATCH(A1,list,0),0)
and it will return 0 rather than #NA# if A1 is not in list.

Finally, wrap that in an IF() function:
=IF(IFERROR(MATCH(A1,list,0),0)>0,"X","")
and it will return X if A1 is in list, or a blank if not.




Doug Jenkins
Interactive Design Services
 
Thanks, Doug

Don't have a use for it yet, but, pretty sure I'll find something.

Dik
 
Doug,

That is what I needed. Thanks a bunch.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor