0

image attached

I have a named range in Google Sheets and I am making a simple query which should return a value but it doesn't work:

=QUERY(range2,"SELECT B WHERE A contains 'test' ") 

It should return "2" but it sais that the query completed with an empty output. Is it a bug?

1 Answer 1

3

actually, QUERY is known to behave like this and its caused by a superiority of numeric values over text string values in a given dataset. fix would be to select columns A and B and format them as Plain text

enter image description here

another approach would be to convert dataset within formula like:

=ARRAYFORMULA(QUERY(TO_TEXT(A:B), "SELECT Col2 WHERE Col1 contains 'test'")) 

0

Sign up to request clarification or add additional context in comments.

1 Comment

I had the same problem in a column where I have dates and text, depending on the row... I fixed a "Plein text" to all to column and it solved the problem ! Thank you

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.