user1128912
user1128912

Reputation: 191

Google Sheets - Arrayformula Query Split debugging

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:

Another example that works:

Example that DOES NOT work:

Can anyone shine a light on this? Thanks in advance

Example Spreadsheet

Upvotes: 1

Views: 782

Answers (1)

nabais
nabais

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 ))

enter image description here

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

Related Questions