How can I add a conditional statement (similar to an if elseif
in .php) to the query listed below so that is will return columns D and E from Sheet2 if column C in the responses sheet == 1st or columns F and G if from Sheet2 if column C in responses sheet == 2nd? It must work within the =QUERY
so it only returns column data from the appropriate row (based on the query).
=QUERY(Sheet2!$A$1:K; CONCATENATE("SELECT B, C WHERE A = ", responses!B1), 0)
I looked into IF(OR)
, but I don't believe that will work because final project will have more than two possibilities (there will actually be eight, 1st through 8th class period).
Here is a link to the Google Spreadsheet I'm working with.
Any suggestions?
=if(C3=1st,"responses!D3",IF(C3=2nd,"responses!F3", "Missing Data"))
A nested IF statement that will pull celldata from the responses sheet from the row identified by =QUERY above. I'm not sure 'if' that is possible and 'if' it is, I'd like a little help including it in the =QUERY. Thank you!