Skip to main content
Best answer

Breaking up comma separated text into new Google Sheet Rows


Hi, I’m trying to use Formatter to separate a line of text like (No, Yes, No, No, Yes) into separate fields, and I want each No/Yes to be in its own cell (row or column doesn’t matter but row preferred).  When I say add row to sheets, it only gives me the option of putting the whole line of text “No, Yes, No, No, Yes” into 1 cell.  How do I break them apart into their own cells?

Best answer by nicksimardBest answer by nicksimard

Hi @Steve K!

One way to approach that would be to use the Formatter’s Split Text function. So you map the field that has those comma-separated items, split on that comma and output one of two things (depending what you want to do):

  1. If you want each comma-separated piece to be on its own row, use #1 in the screenshot below.
  2. If you want each comma-separated piece to be in the same row, but in its own column, use #2 in the screenshot below.

 

If you’re splitting into line items, you’ll have to use the Google Sheets action that suports line items:

 

Can you give that a try to see if you can get it working? Please let me know if you still need help with anything :)

View original
Did this topic help you find an answer to your question?

2 replies

nicksimard
Forum|alt.badge.img+11
  • Zapier Staff
  • 2115 replies
  • Answer
  • May 18, 2020

Hi @Steve K!

One way to approach that would be to use the Formatter’s Split Text function. So you map the field that has those comma-separated items, split on that comma and output one of two things (depending what you want to do):

  1. If you want each comma-separated piece to be on its own row, use #1 in the screenshot below.
  2. If you want each comma-separated piece to be in the same row, but in its own column, use #2 in the screenshot below.

 

If you’re splitting into line items, you’ll have to use the Google Sheets action that suports line items:

 

Can you give that a try to see if you can get it working? Please let me know if you still need help with anything :)


kinder
  • New
  • 3 replies
  • August 31, 2020

Thank you for this, its exactly what I needed and it worked!