regexgoogle-sheetslambdasplitarray-formulas

How to Split a String Up into Individual Characters


Using array formula, how to divide each character into a cell.

Input   Output                                              
cat     c   a   t                                       
dog     d   o   g                                       
horse   h   o   r   s   e                               
tiger   t   i   g   e   r                               

Solution

  • Here's another possible solution.

    =ArrayFormula(
     Iferror(split(regexreplace(A2:A,
                   "(.)","$1❄️"),"❄️"),""))
    

    enter image description here

    This formula uses REGEXREPLACE to insert a placeholder character after each character, and it SPLITs by it.

    ARRAYFORMULA - IFERROR - SPLIT - REGEXREPLACE