dimanche 29 décembre 2019

Prevent "If Not cl Is Nothing Then" from skipping lines of code if cl is nothing (Instead, make it search for other criteria)

How do I make it search for another word like "Walmart" if it doesn't find "Target" and make it search for another word like "Dillions" if it doesn't find "Target" and so on...

Set cl = Range("D:D").Find("Target") If Not cl Is Nothing Then cl.Select cl.Resize(1, 2).Select Selection.Copy ActiveSheet.Paste Destination:=Range("G1") End If

Aucun commentaire:

Enregistrer un commentaire