Search code examples
google-forms

Is there a way to integrate macros with google forms?


I have a basic google form with a short answer input. I'd like to split the input of the form by commas so text input like

aaa, bbb, ccc

would appear in the spreadsheet as

enter image description here

I've tried adding the following macro to column C

=ArrayFormula(split(B1:B500, ","))

but the problem is that new form submissions will just create a new row without the macro applied to columns C, D, E, etc. Is there a way to ensure the macro gets applied to new rows created from users submitting the google form?


Solution

  • It seems like the solution was to change the macro formula from

    =ArrayFormula(split(B1:B500, ","))
    

    to

    =ArrayFormula(split(B1, ","))
    

    then manually drag the formula down as many rows as needed. Not really sure why this was the case.