How to quote the texts in a column?

  • Thread starter Thread starter ecuser
  • Start date Start date
E

ecuser

No, that's my fault. I should've stated it clearly.
I have a sheet filled with data already. There are thousands of rows
and in some columns I wanted them quoted.
Original:
A B C
1 HE SHE THEY
2 IS IS ARE
3
4

wanted:
A B C
1 'HE' 'SHE' THEY
2 'IS' 'IS' ARE

how to do that without manully correct it one by one (too many)
thanks
 
VBA?

Select all cells

Dim cell As Range
For Each cell In Selection
If VarType(cell.Value) = vbString Then
cell.Value = "''" & cell.Value & "'"
End If
Next cell
 
try this formula

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


Let me know if this works as I have not tested it
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top