[Excel] Macro to add prefix to column

Closed
bohsi Posts 1 Registration date Saturday August 25, 2012 Status Member Last seen August 25, 2012 - Aug 25, 2012 at 09:09 PM
rizvisa1 Posts 4479 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Sep 11, 2012 at 09:54 AM
Hi,

I recorded the following macro to add a thorn symbol before and after each record in a table. I can't figure out how to edit the macro so that it will work with a different set a data where there is a different amount of records. Help is much appreciated. Thanks.

Sub Macro6()

Range("A1:A26").Select
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$A$26"), , xlNo).Name = _
"Table9"
Range("Table9[#All,[Column1]]").Select
ActiveSheet.ListObjects("Table9").TableStyle = "TableStyleLight1"
Range("B1").Select
ActiveCell.FormulaR1C1 = "þ"
Range("C2").Select
ActiveCell.FormulaR1C1 = _
"=Table9[#Headers,[þ]]&[@Column1]&Table9[#Headers,[þ]]"
Range("C3").Select

End Sub>

1 reply

rizvisa1 Posts 4479 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 768
Sep 11, 2012 at 09:54 AM
Could you post on some public file sharing site, a sample work book and post back the link to the file back here. It would be easier to tell you answer if one has idea how your table may possibly look like
0