I just try to add Double quote instead of ""O"" but doesn't work
Code:
[A1:A2] = Evaluate("IF({1},""O"" & A1:A3 & ""O"" &"",""&SUBSTITUTE(""O"" & B1:B3 & ""O"" ,"","",""O"" & "";""& ""O"" &A1:A3& ""O"" & "",""& ""O"" ))")