vendredi 13 avril 2018

Excel VBA IF AND Statement

in my excel file i would like to have a commandbutton which send an email to all persons in column A if in column B value is no.

Now my problem is that i am not able to write the If-And statement correct.

This part of my code is wrong:

If cell.Value Like "?*.?*@?*.?*" And LCase(Cells(cell.Row, "B").Value) = "no" Then

If i delete the And statement the button works fine.

I hope someone can help me to solve this problem.

Many Thanks

Aucun commentaire:

Enregistrer un commentaire