Home > Blockchain >  Split a cell that contains a phrase, placing each character of the phrase in a cell
Split a cell that contains a phrase, placing each character of the phrase in a cell

Time:05-24

I'm working with a 16 column x 4 row LCD display and to keep track of my project screens I'm saving it to a google sheets spreadsheet.

I would like to type a sentence and it already puts each character in a cell, maybe using some kind of script, because I've already tested the Data > Split text to columns tool and I can only split a sentence using the space separator, comma, etc. .

Example image of what I want to do on google sheets

Example image of what I want to do on google sheets

CodePudding user response:

to just split stuff by characters you can do:

=ARRAYFORMULA(IFERROR(SPLIT(REGEXREPLACE(A2:A10&"", "(.)", "$1×"), "×")))

enter image description here

to cut off longer stuff you can use:

=ARRAYFORMULA(ARRAY_CONSTRAIN(IFERROR(SPLIT(
 REGEXREPLACE(A2:A10&"", "(.)", "$1×"), "×")), 9^9, 16))

enter image description here

  • Related