2
votes

I have a google spreadsheet with 2 sheets. The first sheet contains data that has been input by a form. Each form response will input data for the following "Timestamp", "Zone", "NPC", "Faction", "Amount", "Faction2", "Amount2", "Faction3", "Amount3", "Faction4", "Amount4", "Faction5", "Amount5".

Row 1 contains the above category names for each response input. The way the form works unfortunately is that each response is put into it's own column based on what Zone is chosen at the beginning as each Zone has different possible responses for the category. So the data is spread out from Columns C to Columns HC. Each row will only have one response per category name, but the category names are repeated and spread out.

I have been using the following query in Sheet2 to pull the information from whichever "Zone" that is selected from the E1 dropdown in the sheet.

 =if(len(E1)=0,"Please Select a Zone in E1",query('Form Responses'!A2:IS,"Select * Where B = """&E1&""" "))

The problem is that it returns the entire Row for the Selected zone so the following information doesn't line up. Is there any way for me to return only the information from the Rows that have data in the cell. This would then line up the data into the correct Column for Sheet2

Below is a link to the Form with some sample data in it, the Cobalt Scar selection lines up as the responses are in the corresponding columns in the data sheet, but Crystal Caverns and Western Wastes do not. You can change selected zone to view the results in Sheet2 E1. Also the sheet is a copy and can be edited by the public.

https://docs.google.com/spreadsheet/ccc?key=0AqEFpZnTydP-dFNNOV9sRzNRSldDUXRJX1pqSFZRYkE&usp=sharing

1

1 Answers

0
votes

I haven't found an elegant solution to this type of problem, but that doesn't mean it's not solvable.

The solution I created on your sheets is easily manageable (only have to update the sheet with the area / column table), but it does take up a little more memory.

How it works:
The ArrangedData tab is the first 2 columns from Form Responses, then the "appropriate" columns (based on the selection made on sheet2; it picks the columns from a lookup on sheet5).

Then ArrangedData is filtered (based on the selection on sheet2 again) into sheet2.

Let me know if you have any questions about it.