Forum Discussion
McilwaineSam
Oct 24, 2022Copper Contributor
Trying to simplify Formula
Hi, I am using the 'CONCATENATE' formula to pull data from different cells into one. I also need to include Double Double quotations around each field and include a Comma between each piece o...
dscheikey
Oct 24, 2022Bronze Contributor
The result of your formula is:
"A,""B"",""C"",""D"",""E"",""F"",""G"",""H"",""I"",""J"",""K"",""L"",""M"",""N"",""O"",""P"",""Q"","
But from your description it would be:
"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q"
I have listed two formulas for the second case.
If you use Excel for Microsoft 365 or Excel for the Web you can use this Formula.
=SUBSTITUTE(SUBSTITUTE(ARRAYTOTEXT(A2:Q2,1),"{",""),"}","")
Or from Excel 2019
=CHAR(34)&TEXTJOIN(CHAR(34)&","&CHAR(34),TRUE,A2:Q2)&CHAR(34)
And with double double quotes:
=CHAR(34)&CHAR(34)&TEXTJOIN(CHAR(34)&CHAR(34)&","&CHAR(34)&CHAR(34),TRUE,A2:Q2)&CHAR(34)&CHAR(34)