This is a problem that had me stumped for a moment today until I searched and found the answer.
I was using Excel string concatenation to generate SQL INSERT statements for a database import.
It was working fine until suddenly each cell I copied from Excel pasted with a double-quote (“) around the value.
The first answer to my Google search made we realise the problem: I’d added a line-break in the middle of my formula to help visualise my work while I was constructing the SQL.
It turns out when you add line breaks to cells in Excel, copied values are surrounded by quotes.
This actually makes sense when you think about it . Consider it in the context of working with CSV files – you need to distinguish between a line-break in a value and a new row/record in the file.
It just didn’t occur to me because now I’d never encountered it in this context.
Remove the line break and no more quotes are added to the copied values.
Alternate post title: ‘Excel: Copying cell with formula sometimes wraps value in double quotes (“)’