vendredi 27 février 2015

VBA Evaluate function with string arguments

I have this function working ( It returns the row where the text DK001 sits in the ID range)



Found = Application.Evaluate("=IF(ID=""DK001"",ROW(ID),""x"")")


I would like to feed the searchcriteria (e.g. DK001) as a string, like



Found = Application.Evaluate("=IF(ID=SearchString,ROW(ID),""x"")")


I fail in creating a string that is accepted as a search criteria. I need your help on this! What am I doing wrong?


Aucun commentaire:

Enregistrer un commentaire