Adding double quotes around entries in a column

N

NCdesigner

I need to add double quotes at the beginning and end of all entries in a very
long column. How can I do this without typing manually?
 
E

Eduardo

Hi,
Let's say the column is A, in B enter this formula
=""" &A1& """
if this was helpful click yes
 
B

Bernard Liengme

In next column, use formula =""""&A1&"""" and copy it down the column by
double clicking the fill handle (small sold square in lower right corner of
active cell)

If you wish you could select and copy all of the results; then with the
range still selected use Edit | Paste Special with Values specified. This
converts formulas to values and allows you to delete the original data
best wishes
 
G

Gord Dibben

If you want minimal typing and no formulas to clean up....................

Sub Add_Text_Left_Right()
Dim Cell As Range
Dim moretext As String
Dim thisrng As Range
On Error GoTo endit
Set thisrng = Range(ActiveCell.Address & "," & Selection.Address) _
.SpecialCells(xlCellTypeConstants, xlTextValues)
moretext = InputBox("Enter your Text")
For Each Cell In thisrng
Cell.Value = moretext & Cell.Value & moretext
Next
Exit Sub
endit:
MsgBox "only formulas or numbers in range"
End Sub

Select the column.....................Enter " in the Inputbox.


Gord Dibben MS Excel MVP
 

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