1

I have a Google Sheet with 2 sheets. In sheet 01 I have this table.

enter image description here

In sheet 02 I want to have a "Search by Tag" sheet. So, googling I got this formula

=QUERY('01'!A2:D4, "select B,C,D where A = 'Yellow' order by B")

enter image description here

But I have 2 problems here:

1.- I need the formula to take the data from A2, under "Search Tag". As you can see, I have to write directly the tag name into the formula.

2.- I need the formula to find at least one of the tags in the same cell. For example, if I look for "red", it will show "Red Computer" data.

0

In your Sheet 02 you should use:

  • cell A2: (Your Search Tag)
  • cell B2: =QUERY('01'!A2:D4, "select B,C,D where A like '%"&A2&"%' order by B",0)
  • Exactly what I need! Thank you a lot. – Roberto de Nobrega Aug 27 at 19:06
  • I'm trying to improve this formula. I did this =QUERY({01!A2:H1000;02!A2:H1000}, "select B,C,D where lower(A) like '%"&lower(A2)&"%' order by B",0) I'm trying to take info from 2 sheets, so in this formula the Search Tag sheet would be number 03, but I get a #VALUE! error. Why? Is it possible to do this from 2 sheets at the same time? – Roberto de Nobrega Aug 27 at 19:34
  • And, as a plus, can I add a tag to the results according to the sheet name they came from? Ex. Sheet 01 is called Products, and Sheet 02 is called Services. So, I search for the tag "house" that is for "Red Computer" and "Housekeeping". In the results, can I get an extra column with the name of the Sheet next to each item. EX: Red Computer / Sheet 01. Housekeeping / Sheet 02. Thanks for the help – Roberto de Nobrega Aug 27 at 19:40
  • What you are asking for in your comments is a completely different request from the original one. For clarity and consistency reasons, I suggest you create a new question and look for an answer there. This time do include a link to a sample spreadsheet along with the desired result. (It is a good practice to exersize) – marikamitsos Aug 28 at 3:21
0

You can use IF with a REGEXMATCH function or FILTER for the same result without QUERY.

If you really want a Query, here's a fix :
1 -

Try this instead

=QUERY('01'!A2:D4, "select B,C,D where A = '"&A2&"' order by B")

2-

Can you explain your needs a little more, with a screenshot of expected result perhaps ?

0
  • paste this in B1 cell:

    =QUERY(01!A:D, "select B,C,D where lower(A) contains '"&LOWER(A2)&"' order by B", 1)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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