Reputation: 91
I am not able to use this formula in vba, can you please help me with this:
Range("L2").Formula = "=IF(OR(ISNUMBER(SEARCH("CTA",K3)),ISNUMBER(SEARCH("Dissolved",K3)),ISNUMBER(SEARCH("ZBA",K3))),"Yes","No")"
When I am doing it manually its working fine but when I am trying it thru VBA I am getting error, please correct me.
I tried to look into old question but not able to match with this
Upvotes: 1
Views: 1664
Reputation: 175826
That's not a valid string, the interior "
must be escaped as ""
Range("L2").Formula = "=IF(OR(ISNUMBER(SEARCH(""CTA"",K3)),ISNUMBER(SEARCH(""Dissolved"",K3)),ISNUMBER(SEARCH(""ZBA"",K3))),""Yes"",""No"")"
Upvotes: 2