0
votes

Struggling with a Google Sheets QUERY. I have a dataset containing a list of ID's, names (last and first), addresses, phone, email, etc. I also have grouped the names into categories: All, High, Medium, Low). This dataset is located in one tab ('2021 Roster').

On another tab, I have used QUERY to pull ID and name from the first dataset =QUERY('2021 Roster'!$A$3:$K,"SELECT A, B, C, K"). On this same tab, I have added further data associated with each name, such as order placed, payment received, etc. This information is entered manually in the row associated with the ID.

I am trying to link this data to the QUERY as follows: =IF(A2="All",FILTER(QUERY('2021 Roster'!$A$3:$K,"SELECT A, B, C, K",0),D4:L,G4:G="All"), where Cell A2 is a drop down with All, High, Medium, Low. This is not working.

I want to be able to go to the drop down and select "All" and then get the full list of names with the order data, or select High, Medium, Low and just get the sorted rows containing information from data off both tabs for each of those values.

Can this be done?

thanks!

1
Share a copy of your sheetidfurw

1 Answers

0
votes

Try something like

=QUERY('2021 Roster'!$A$3:$L, "SELECT A, B, C, K, D, E, F, G, H, I, J, L " &IF(LEN(A2), "where G = '"&A2&"'",), 0)

and see if that works?