1

GoodDay everyone, recently I am trying to learn about using the Google Sheets. My question is same as the title, and these are some examples of the data.

The data from first sheet

The data from second sheet

I am trying to create a searching function in the main page in order to get some data by selecting a specific sheet.

And these are the result I expect to see. By choosing option using the dropdown list, I expect the query or any other things will detect the option and display all the data I need from the sheet I have chosen.

RESULT EXPECTED 1

RESULT EXPECTED 2

RESULT EXPECTED 3

Is that even possible in Google Sheets?

player0
  • 124,011
  • 12
  • 67
  • 124
Jackie6333
  • 15
  • 2

1 Answers1

1

use:

=INDEX(QUERY({
 IFERROR(JACKIE!A4:A/0, "JACKIE"), JACKIE!A4:B;
 IFERROR(KELVIN!A4:A/0, "KELVIN"), KELVIN!A4:B}, 
 "where Col2 is not null 
    and Col1 = '"&B2&"' 
    and Col3 = '"&B3&"'", ))
player0
  • 124,011
  • 12
  • 67
  • 124
  • May I ask what does the A/0 means? – Jackie6333 Dec 10 '22 at 03:26
  • @Jackie6333 sure. its actually `A4:A/0` where we divide the range by zero to invoke the error (coz division by zero is not possible) we need that triggered error so we could hide it with IFERROR but instead of hiding it we print the sheet name. basically, we create a virtual column of sheets' name – player0 Dec 10 '22 at 09:45