XCode2015
XCode2015

Reputation: 193

Add quotes after comma in one cell excel

I have a task, this is my record in excel

enter image description here

I want to it change to this result after i pasted

enter image description here

Then i use & to connect every cell in to one cell, and this is my result that i want.

enter image description here

Hope i can show my idea, i want to create sql insert script by excel. But i see problem in VALUE, hope you can help me. Thank you!

Upvotes: 0

Views: 41

Answers (1)

ThunderFrame
ThunderFrame

Reputation: 9461

Just prefix with an additional ' and replace the , with ','

Cell Value = ''1','A'
Cell Value = ''2','B'
...

If you need to change your existing cells, add a column with this relative formula in each row (where the original text is in column A):

=TEXT("'"&SUBSTITUTE(A1,",","','"),"@")

Then copy all those and paste special as values.

Upvotes: 2

Related Questions