I am trying to use the split function within the ARRAYFORMULA function inside a google spreadsheet.
I want "1.2.3.4" to become "1", "2", "3", "4"
This is the code for a one-liner (working for 1 row only):
=SPLIT(A2;".")
This is what I want to achieve (to work on multiple rows at the same time):
//alone
=SPLIT(A2:A;".")
//or with ARRAYFORMULA
=ARRAYFORMULA(SPLIT(A2:A;"."))
Since the SPLIT function can't be used within the ARRAYFORMULA function, I searched for a workaround (ARRAYFORMULA() does not work with SPLIT()):
=ARRAYFORMULA(IFERROR(REGEXEXTRACT("."&A2:A;"^"&REPT(".+[^.]+";COLUMN(OFFSET(A2;;;1;4))-1)&".+([^.]+)")))
It's almost working except for the fact that it doesnt split correctly, here is the result I get:
"1.2.3.4" becomes "4", "4", "4", "4"
If I can get the workaround to actually work correctly or a better alternative that would be more than awesome...