Hi ppl,
I am doing some data cleaning and I have multiple columns, each with a unique formulas. I recorded each column's execution as separate macros.
However, when I try to run this particular macro it throws a run-time error.All I have is nested SUBSTITUTE functions.
Can somebody help with it as Im a vba noob and cant figure out whats wrong.
Thanks,
Manasa
'
I am doing some data cleaning and I have multiple columns, each with a unique formulas. I recorded each column's execution as separate macros.
However, when I try to run this particular macro it throws a run-time error.All I have is nested SUBSTITUTE functions.
Can somebody help with it as Im a vba noob and cant figure out whats wrong.
Code:
ActiveCell.FormulaR1C1 = _
"=IFERROR(SUBSTITUTE(SUBSTITUTE( SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(RC[-1],""A"",""X""),""AU"",""B""),""LVR"",""CB""),""KKK"","Y""),""YY"",""""),""PO"","""",1),""!"",""""),""B"",""""),""" & _
"),""PEEE"",""O"),""QP"",""""),""pe"",""90""),""IO"",""L""),""-"",""""),""VVV",""""),""TTT"",""""),""111"",""""),""222"",""X""),""123"",""""),""#3(9670)"",""""),""T"",""""),RC[-1])"
Range("B2").Select
Selection.AutoFill Destination:=Range("B2:B40000")
Range("B2:B40000").Select
End Sub
Thanks,
Manasa
'