How to enclose text in a cell in quotes

B

booker@mgt

If I have some text in a cell and I want to wrap that text in quotes, do you
know of a simple way to do that


i.e Cell says Whoever answers this question is the greatest

and I want it to be “Whoever answers this question is the greatestâ€

And I want to do that for everything in that particular column?

Thanks
 
P

PCLIVE

You could, of course, use a helper column to get your results. For example,
if your data begins in cell A1, then use this formula in another column and
copy down as needed.

="""" & A1 & """"

HTH,
Paul
 
D

Dave Peterson

You could insert a helper column to the right and use a formula like:

=char(34) & a1 & char(34)
or
=""""&A1&""""
Drag down as far as you need.

Then copy this column and paste special|values over the original column.

Then delete the helper column.
 
D

Don Guillett

Should do it. Change f to suit your column. Send Wild Turkey 101.

Sub makequotes()
mc = "f"
For i = 2 To Cells(Rows.Count, mc).End(xlUp).Row
If Cells(i, mc) <> "" And Left(Cells(i, mc), 1) <> """" Then
Cells(i, mc).Value = """" & Cells(i, mc) & """"
End If
Next i
End Sub
 
B

booker@mgt

Thanks

PCLIVE said:
You could, of course, use a helper column to get your results. For example,
if your data begins in cell A1, then use this formula in another column and
copy down as needed.

="""" & A1 & """"

HTH,
Paul
 
B

booker@mgt

Thanks Don, I ended up using the suggesstion above you, but I did document
your solution as well.

Thanks
 

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

Top