0

I am looking for a way to rearrange a spreadsheet that's generated by a Google Form. For unrelated reasons, we can't change the form at this time to better suit the readability of the answer spreadsheet, so I'm hoping there's a way to rearrange the sheet. Intuitively, it seems like this would be possible, but I'm hitting a wall.

The form asks for a respondent's name and then dates on which the respondent is available. The resulting spreadsheet then lists all the names down the first lefthand column, and words in the subsequent columns indicating whether the respondent is available on the requested dates.

I would like to have the dates listed as headings, and then have the respondents' names themselves listed beneath, so all names that are available on a certain date would be listed below that date, much like a doodle poll (which it would be easier if we were using, but oh well).

I've thought of two ways to effect this: somehow replace the words indicating availability with the name, like a row-specific find-and-replace, or somehow sort the data differently coming out of the form.

No idea where to begin with either, and my Google searches have not been fruitful. If there's any directions in which you could point me, that would be greatly appreciated! Thank you!

Solar Mike
  • 7,156
  • 4
  • 17
  • 32
user53
  • 21
  • 3

1 Answers1

0

Try this formula:

=ARRAYFORMULA(TRANSPOSE({QUERY(QUERY({A2:B, B2:B}, "select Col1,max(Col2) where Col1 is not null group by Col1 pivot Col3"), "select Col1 offset 1", 0), TRIM(SPLIT(REGEXREPLACE(TRIM( TRANSPOSE(QUERY(TRANSPOSE(QUERY(QUERY({A2:B&"×", B2:B}, "select max(Col2) where Col1 is not null and Col2 <> '×' group by Col1 pivot Col3"), "offset 1", 0)),,999^9))), "×$", ), "×"))}))

Results:

enter image description here

I'd recommend changing the date column to be on ColA on your form response sheets.

Reference (Thanks player0):

Combine duplicate rows in column as comma separated values - Google Query

Century Tuna
  • 1,378
  • 1
  • 6
  • 13