formula for adding quotes to pre-existing data

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

Guest

I just cant figure out the right formula for adding quotes to multiple rows
of pre-existing data The data is there now in this form EXAMPLE and it needs
to look like this "EXAMPLE"; the formula that i've been working with is
=""""&A2&""";" but of corse it can't be applied to more than one cell and
it needs to work for thousands. Any help would be great.
 
you could do it a whole lot quicker with a simple macro:

Sub Justin()

Dim ws as Worksheet
Dim myRange as range
Dim c as range

Set ws = ActiveWorksheet
Set myRange = ws.Range(" xx ")
'remove the X's and the extra spacing between
'the quotes & enter the range you want changed

For Each c In myRange
If c.Value = "Example" Then
c.Value = ""Example""
End If
Next c

End Sub

copy & paste the above sub into a VBA module & then run it.
hope this helps!
:)
susan
 

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

Back
Top