Concatenation function in Excel 2010 to add single quotes and commas

I am working on a borrowing laptop and found that the concatenation function I used to add single quotes and comma to a column of text no longer works. I need this to cast a series of IDs into a SQL query. The function I have been using for years is = concatenate ("'", A1, "',") to get the result "A1". This is in Microsoft Excel 2010.

+6


source to share


2 answers


Try the following as an alternative = concatenate ():

="'"&A1&"',"

      



I used the above to do exactly what you are trying to accomplish.

+12


source


Follow the steps below.

1- select all lines.

2- right click and select cell format



3- select the numbers tab

4- select custom on the left category tab and

5- under the type enter '@' (if the column has hello after applying the format, it will turn into 'hello')

0


source







All Articles