Compile error , Expected: end of statement

45 views Asked by At

Following is the vba code, (just inserted formula in vba)

Sub xyz()
Range("H2").Formula = "=TEXTJOIN(";",TRUE,FILTERXML("<t><s>"& SUBSTITUTE(SUBSTITUTE(A2,"/","</s><s>"),";","</s><s>")&"</s></t>","//s[not(contains(., '.'))]"))"
Range("H2", "A" & Cells(Rows.Count, 1).End(xlUp).Row).FillDown
End Sub

But i get this error: highlighting ";" next to textjoin.

enter image description here

Please help to correct this code.

0

There are 0 answers