Reputation: 191
I have a spreadsheet where I manually copy and paste some data from pdf tables. I've been using array query split to split that info into different columns and it works flawless in 2 columns (date and amount) and for the other one it works most of the time (reference).
Example that works:
=ArrayFormula(QUERY(SPLIT(C3:C7 ;" ");"select Col1";0))
Another example that works:
=ArrayFormula(QUERY(SPLIT(C3:C7 ;" ");"select Col1";0))
Example that DOES NOT work:
Can anyone shine a light on this? Thanks in advance
Upvotes: 1
Views: 782
Reputation: 2037
It will work if you change the query to:
=ArrayFormula(INDEX(SPLIT(REGEXREPLACE(C3:C7; "\s"; "♥");"♥");ROW(C3:C7)-ROW(C3);1))
The formula will replace the spaces by hearts (rare character) and then it will populate the rest.
To change the values of the rows, just change the last character 1 to 2 or 3:
)-ROW(C3); ==> 1 ))
You can use the same formula to the G
column (don't forget to update the ranges), as the delimiters of both of the 4500063794 21.07.2020 187.50
and the 447/20.6TBOS 04.07.2020 804.00
are the same (whitespaces).
Upvotes: 2