IF combined with VLOOKUP and CONTAINS

milla -  
Vaucluse Posted messages 27336 Registration date   Status Contributeur Last intervention   -
Hello,

I want to create a formula like this:

if (Vlookup contains "test" then formula 1 else formula 2).

But when I write:

if(Vlookup(...;...;...)="*test*";formula1; formula2) it returns an error.

It seems that the issue comes from ="*test*".

2 réponses

Fahora Posted messages 949 Status Membre 68
 
Hello,

you should rather do:

=IF(COUNTIF(VLOOKUP(...;...;...);"*test*"); formula1; formula2)

Best regards

Our only limits are those we impose on ourselves.
Politeness and a thank you don’t hurt. There is a button for "Resolved" to confirm that your problem is no longer one. Fahora
0
Fahora Posted messages 949 Status Membre 68
 
Sorry, small mistake:

Use the "FIND" function

=IF(FIND("test",VLOOKUP(...,...,...,False))>=1;formula1;formula2)

The >= 1 means that the word can be written multiple times in the search.
0