Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I want to check if the value of a cell exists in a range of cells. How can I do this?

Just like you would be able to do "if value in list_of_values" in Python for example.

share|improve this question
1  
Were you able to apply my solutions? –  Jacob Jan Tuinstra Jun 6 '13 at 11:55
add comment

3 Answers 3

Please try say:

=countif(G:G,6)  

if you want to find the number 6 in ColumnG:G and/or

=countif(A1:B7,"d")  

if you want to find d in the first seven rows of the first two columns.

By find I really mean count the number of instances in the chosen range.

share|improve this answer
add comment

Use can do that in different ways:

=IFERROR(IF(UNIQUE(FILTER(B2:B,B2:B="text"))="text";"Found";"Not Found");"Not Found")

=IFERROR(IF(COUNTIF(ARRAYFORMULA(range="text"),TRUE)>0;"Found";"Not Found");"Not Found")

=IFERROR(IF(COUNTIF(ARRAYFORMULA(FIND("text", FILTER(range,range<>""))),">"&0)>0;"Found";"Not Found");"Not Found")

share|improve this answer
add comment

Use GoogleSpreadsheet and there

=vlookup(C2;A2:B4;2;false)

and then connect document via API.

share|improve this answer
    
Can anyone explain why this is "-3" ? –  chester1000 Mar 12 at 16:34
    
@chester1000 I guess because it does not answer this question and, perhaps worse, might sometimes give the right result just by chance. Also for this Q "and then connect document via API" seems irrelevant to me. –  pnuts Jun 17 at 9:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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