I have rows of data like so:
a|b|1|c|d
a|b|1, 2|c|d
e|f||g|h
I am using BYROW to split them:
=BYROW(
A2:A,
LAMBDA(
row,
SPLIT(
row,
"|",
,
FALSE
)
)
)
This works but then for cells that LOOK like numbers it converts to numbers. This breaks a QUERY formula I am trying to wrap around.
=QUERY(
BYROW(
A2:A,
LAMBDA(
row,
SPLIT(
row,
"|",
,
FALSE
)
)
),
"SELECT * WHERE Col3 IS NOT NULL"
)
query does not like mixed data types in a single column (Query is ignoring string (non numeric) value) so the above function returns all the rows but does not return value in cells that don't have a number. So this is the output I get:
| a | b | 1 | c | d |
| a | b | c | d |
But the expected output is:
| a | b | 1 | c | d |
| a | b | 1, 2 | c | d |
I've concluded this is cause SPLIT converts to number. I can't use TO_TEXT becuase some columns have dates that I do want to convert.

