svk
svk

Reputation: 3

How to concatenate all the cell values with each cell value as 'cell_value' and seperated by a comma

i have a excel with the below column headers.How can i generate a new column which has each cell value from the below listed columns in a '' and seperated by a comma(,).This is required so that the data can be loaded into a Oracle table.

Column headers(A till K): Configuration_Setting_ID,Configuration_Setting_Name,Description,Assessment_Procedure,Automated_Implementation,Default_Break_Severity,Default_Vulnerability,Technology_Hierarchy,Configuration_Setting_Owner,Status,Published_Date

enter image description here

required format after combining all the values in a row: 'Configuration_Setting_ID','Configuration_Setting_Name','Description','Assessment_Procedure','Automated_Implementation','Default_Break_Severity','Default_Vulnerability','Technology_Hierarchy','Configuration_Setting_Owner','Status','Published_Date'

i tried to use the CONCAT function like =CONCAT('A','B','C',....'K') which didnt work

Upvotes: 0

Views: 75

Answers (1)

RGilchrist
RGilchrist

Reputation: 116

If your first header was in Cell A1, then your formula could be

='&TEXTJOIN("','",,$A2:$L2)&'

Assuming you wanted the inverted commas in your final product. If not, it would be:

=TEXTJOIN(", ",,$A2:$L2)

Upvotes: 1

Related Questions