Hi I’m new to VBA and I’ve created a code to format my Table however I receive an error “Compile Error: Syntax Error” when trying to run it.
I have tried to look at the code but I can’t seem to find what the issue is.
The first Cell.Replace section is highlighted red when I try to run it.
Any help is appreciated. Thanks.
Sub TableFormat()
Cells.Replace What:="xl", Replacement:="", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False _
, FormulaVersion:=xlReplaceFormula2
Cells.Replace What:="£", Replacement:="GBP", LookAt:=xlPart _
, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
Range("A1").Select
Selection.End(xlToRight).Select
ActiveCell.Offset(0, 1).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Clear
Columns("A:A").Delete
Range("A1").Select
End Sub