Home > Software engineering >  Is there a way to parse checkbox responses from Google Form in Google Sheet using Apps Script?
Is there a way to parse checkbox responses from Google Form in Google Sheet using Apps Script?

Time:06-23

I have a Google Form with 2 questions, both questions have checkbox options that allow people to vote on 3 items from each question. After voting has concluded, I want to export the responses to Google Sheets to then count up the votes. As I'm sure you know, Google Sheets puts all selected checkbox options into 1 column. Is there an Apps Script code to parse each selected checkbox option into its own column?

People are tracked by their email addresses and can only vote once

Currently it looks like this |email|, |item 1, item 2, item 3|

I want it like this |email|, |item 1|, |item 2|, |item 3|

CodePudding user response:

Instead of using a script you could always use a simple formula for that.

=ArrayFormula({B2:B,IFERROR(TRIM(SPLIT(C2:C,",",1,1)))})

enter image description here

  • Related