Inserting "quotes" around characaters in a cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 
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
 
Back
Top