Adding text Left and Right of a field

  • Thread starter Thread starter lennymos123
  • Start date Start date
L

lennymos123

I'm using a datefeed that needs some attention to before uploading.
When the feed comes the one field is in HTML i need to put "!!<" at the
start of the Field and ">!!" at the end of the field so it reads HTML
when uploaded.. So i need to add this to one field with 250 records
anyone got any ideas

PAul
 
Paul

one way would be to use an extra column. Assuming the data is in column A,
in cell X1 , say, put the formula:

="!!<" & A1 & ">!!"

drag this formula down for the 250 rows. Now select all column X, copy it
and Paste Special | Values over the data in column A. Finally, delete
column X.

Regards

Trevor
 
lennymos123 said:
I'm using a datefeed that needs some attention to before uploading.
When the feed comes the one field is in HTML i need to put "!!<" at the
start of the Field and ">!!" at the end of the field so it reads HTML
when uploaded.. So i need to add this to one field with 250 records
anyone got any ideas

Hi

Put this macro in a module, then run it. I'm asuming your data is in
A1:A250 - change it as needed.

Public Sub MakeHTML()
Dim temp As String

For Each cell In ActiveSheet.Range("A1:A250")
temp = cell.Value
cell.Value = "!!<" & temp & ">!!"
Next

End Sub

If you'r new to macros press alt+F11 to bring up the VBE (Visual Basic
Editor), then Insert/Module and paste the code in that module. Press F5
to run the code.

/Sune
 
Back
Top