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

  • by
(solved)-–-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

Leave a Reply

Your email address will not be published. Required fields are marked *