Reputation: 5
I'm trying to query a column and select cells that contain the word: pink. I want to give this new column a new name: Biz priority. Current formulas I've tried but getting errors for all of them:
=QUERY(N:N,"SELECT N WHERE N CONTAINS 'pink', LABEL * 'Biz Priority'"),1
=QUERY(N:N,"SELECT N LABEL N 'Biz Priority', WHERE N CONTAINS 'pink'"),1
=QUERY(N:N,"SELECT N LABEL * 'Biz Priority', WHERE N CONTAINS 'pink'"),1
This works: =QUERY(N:N,"SELECT N WHERE N CONTAINS 'pink'"),1
but the column title is the same as another column which won't work for me. TIA
Upvotes: 0
Views: 566
Reputation: 4620
On:
=QUERY(N:N,"SELECT N WHERE N CONTAINS 'pink', LABEL * 'Biz Priority'"),1
Remove the comma before LABEL
, change *
to N
, move the )
to the end.
=QUERY(N:N,"SELECT N WHERE N CONTAINS 'pink' LABEL N 'Biz Priority' ",1)
You can also make it case-insensistive:
=QUERY(N:N,"SELECT N WHERE LOWER(N) CONTAINS 'pink' LABEL N 'Biz Priority' ",1)
Upvotes: 1