ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Inserting "quotes" around characaters in a cell (https://www.excelbanter.com/excel-discussion-misc-queries/164473-inserting-quotes-around-characaters-cell.html)

Lolo79

Inserting "quotes" around characaters in a cell
 
I have to have all the info in certain cells in quotes " ....". Right now it
is just entered in without quotes. Is there a way to insert the quotes?

Pete_UK

Inserting "quotes" around characaters in a cell
 
Here's one way of doing it, assuming your data is in A1:

=CHAR(34)&A1&CHAR(34)

Copy down for as many entries as you have.

You might want to fix the values and get rid of the original data - if
so, highlight the cells with the formula in, click <copy, then Edit |
Paste Special | Values (check) | OK then <Enter. You can now delete
the column with the original data in, or copy the new values over the
original and delete the column which had the formulae.

Hope this helps.

Pete


On Nov 1, 11:29 pm, Lolo79 wrote:
I have to have all the info in certain cells in quotes " ....". Right now it
is just entered in without quotes. Is there a way to insert the quotes?




JE McGimpsey

Inserting "quotes" around characaters in a cell
 
One way:

Select your certain cells and run this macro:

Public Sub InsertQuotes()
Dim rArea As Range
Dim rCell As Range
On Error Resume Next
For Each rArea In Selection
For Each rCell In rArea
With rCell
.Value = """" & .Text & """"
End With
Nxt rCell
Next rArea
End Sub

If you're not familiar with macros, see

http://www.mvps.org/dmcritchie/excel/getstarted.htm



In article ,
Lolo79 wrote:

I have to have all the info in certain cells in quotes " ....". Right now it
is just entered in without quotes. Is there a way to insert the quotes?



All times are GMT +1. The time now is 02:21 PM.

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