As part of an end process dump of data from an application I manipulate the raw output so myself and my team can use further.
I currently manually alter this data but I have been experimenting with excel macro's to try carry out the same action. A basic example of what I am trying to achieve is:
Sample Data
Create a macro to do a find and replace to remove the tags from the raw data and add to the cell value to have a final set of data like ' + Cell Value + ',
I have little experience with VBA and have put this together from snippets of code found from a few quick searches around this area.
Sub ReplaceMetadataTags()
Columns("A").Replace What:="<tag1>", _
Replacement:="", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False, _
SearchFormat:=False, _
ReplaceFormat:=False
Columns("A").Replace What:="</tag1>", _
Replacement:="", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False, _
SearchFormat:=False, _
ReplaceFormat:=False
Dim myCell As Range
For Each myCell In Selection
If myCell.Value <> "" Then
myCell.Value = Chr(39) & Chr(39) & myCell.Value & Chr(39)
End If
Next myCell
End Sub
But lack the experience to debug this further.
If anyone could point me in the right direction I'd appreciate it.


VBA.