I am trying to insert the following index match formula with wildcards using vba like so:
Cells(i, 13) = "=IFERROR(INDEX(Contacts!$C:$C,MATCH(" * " & Range(""C"" & i).Value & " * ",Contacts!$B:$B,0)),"""")"
For some reason i get a type mismatch error. Please can someone show me what i'm doing wrong?
EDIT:
Cells(i, 13).Formula = "=IFERROR(INDEX(Contacts!$C:$C,MATCH(""*"" & """ & Range("G" & i).value & """ & ""*"",Contacts!$B:$B,0)),IFERROR(INDEX(Contacts!$C:$C,MATCH(""*"" & LEFT(""" & Range("G" & i).value & ,7) """ & ""*"",Contacts!$B:$B,0)),""""))"