Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This question already has an answer here:

I would like to use a formula to identify if a cell in a group of cell contains a specific word. Example, I'd like to search if a cell has the content X The formula's response could be 1 if found, 0 if not found.

share|improve this question

marked as duplicate by KronoS, mpy, Scott, gronostaj, tombull89 Jun 26 '13 at 8:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

Using the IF function you can do this. Here is the syntax;

IF(logical_test, [value_if_true], [value_if_false])

In a cell you can enter the formula to check a cell for the existence of X. If it is there the formula result will be a 1, else-wise a 0.

=IF(A1="X", 1,0)

Here it is in a sheet;

enter image description here

Side Note: Sorry for the basic answer, but your question is too vague to give you a more specific details. You might want to read how to ask to improve your question quality.

share|improve this answer
    
I agree that the question is vague, but it mentions “a group of cell” [sic], which suggests to me that the OP is interested in having a cell that checks a range of cells –– something like =OR($A1:$A12="X"), entered as an array formula. Another ambiguity in the question is the phrase “contains a specific word”. What if a cell contains “The quick brown fox” and X is “fox”? Then a simple = isn’t good enough; you need to do a FIND. –  Scott Jun 24 '13 at 19:50
    
@scott They also stated "I'd like to search if a cell has the content X" which the above answer is a simple solution for. IMO, without more details it would be unreasonable to read into the question. Feel free to post an answer with a formula using FIND. There are more ways than one to get the same results. –  CharlieRB Jun 24 '13 at 20:17
    
Thanks for the answers, I am sorry if I was not clear enough. I am trying to find if one cell in group of cells has a specific content such as the letter X only (not part of a word like fox). I hope this is clearer. JP –  user233403 Jun 25 '13 at 4:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.