Search code examples
google-sheetssplit

SPLIT function in Google Sheets with csv, but ignore comma between quotation marks


I need to split this to columns, but ignore the comma between the quotation marks:

05-10-2022,14:43,"Unaforma LLS LS-,27285714",GD00B7KR2P84,FRA,FRAB,-715,3.3950,EUR,2427.43,EUR,2427.43,EUR,,-4.90,EUR,2422.53,EUR,b39cf45c-b5c8-4ee1-982f-0ad2fd704dde

I honestly have no idea how to do this. I tried using the split function, but then it also splits the comma between the quotation marks.


Solution

  • Can you test:

    =arrayformula(substitute(split(regexreplace(A2,"""(.*?)(,)(.*?)""","$1🐠$3"),","),"🐠",","))
    

    enter image description here