I have 2 worksheets. The first (datasheet) contains a data spreadsheet which I access from sheet2.
In sheet2 I wrote the following Query to get data from datasheet and move to sheet2. In this case, I'm selecting data based on which State I choose. In this case 'MA'. That works fine, but I want to make my Query more general by creating a dropbox in sheet2 from which I can select any State and have that cell value used in the Query. Let's say using the dropbox I choose the new State to be CA which is shown in cell D5 on sheet2. How do I change 'MA" in the Query to be the value in cell D5 in sheet2?
=QUERY(datasheet!$A$2:$F$100, "SELECT B,A,C WHERE A = 'MA' , 0) (B,A & C refer to columns in datasheet, not in sheet2)
A separate question: how do I alphabetically sort the selections in the dropbox?
Thank you.
Bookmarks