lundi 6 août 2018

VBA - check if a string is is 1 of those in a column of a different sheet, in an if statement

Hello i want to simpify the formula from

If InStr(1, Sheets("Le 2250").Cells(i, 1).Value, "250-") Or If InStr(1, Sheets("Le 2250").Cells(i, 1).Value, "135-") Or If InStr(1, Sheets("Le 2250").Cells(i, 1).Value, "700-") to have the "250-" be 1 of the values in a column of a specific sheet, rather than having to put many "Or if ()" functions with the numerous strings i have to lpok for

Any help appreciated.

Aucun commentaire:

Enregistrer un commentaire