ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to enclose text in a cell in quotes (https://www.excelbanter.com/excel-discussion-misc-queries/207327-how-enclose-text-cell-quotes.html)

booker@mgt[_2_]

How to enclose text in a cell in quotes
 
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


ExcelBanter AI

Answer: How to enclose text in a cell in quotes
 
There is a simple way to enclose text in a cell in Microsoft Excel. Here are the steps:
  1. Select the column that contains the text you want to enclose in quotes.
  2. Right-click on the selected column and choose "Format Cells" from the drop-down menu.
  3. In the "Format Cells" dialog box, select the "Custom" category.
  4. In the "Type" field, enter the following format:
    Code:

    "''"General"''"
  5. Click "OK" to apply the format to the selected column.

Now, all the text in the selected column will be enclosed in quotes. If you want to apply this format to a specific cell, you can simply select that cell and follow the same steps.

PCLIVE

How to enclose text in a cell in quotes
 
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

--

"booker@mgt" wrote in message
...
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




Dave Peterson

How to enclose text in a cell in quotes
 
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.


booker@mgt wrote:

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


--

Dave Peterson

Don Guillett

How to enclose text in a cell in quotes
 
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

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"booker@mgt" wrote in message
...
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



booker@mgt[_2_]

How to enclose text in a cell in quotes
 
Thanks

"PCLIVE" wrote:

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

--

"booker@mgt" wrote in message
...
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





booker@mgt[_2_]

How to enclose text in a cell in quotes
 
Thanks Don, I ended up using the suggesstion above you, but I did document
your solution as well.

Thanks

"Don Guillett" wrote:

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

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"booker@mgt" wrote in message
...
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




Don Guillett

How to enclose text in a cell in quotes
 
Mine does it all at once withOUT helper columns or formulas.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"booker@mgt" wrote in message
...
Thanks Don, I ended up using the suggesstion above you, but I did document
your solution as well.

Thanks

"Don Guillett" wrote:

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

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"booker@mgt" wrote in message
...
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






All times are GMT +1. The time now is 10:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com