ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   formula for adding quotes to pre-existing data (https://www.excelbanter.com/excel-programming/394478-formula-adding-quotes-pre-existing-data.html)

Justin R

formula for adding quotes to pre-existing data
 
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.

Susan

formula for adding quotes to pre-existing data
 
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


On Jul 31, 10:50 am, Justin R <Justin
wrote:
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.




John Bundy

formula for adding quotes to pre-existing data
 
Just copy that formula and paste it down, it should format all of it.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Justin R" wrote:

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.



All times are GMT +1. The time now is 12:13 PM.

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