Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Example image of what I want to do on google sheets

>Solution :

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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading