How to check whether there is value in a variable range?
When we do a search using .find:
Code:
Set sought = Sheets(i).Cells.Find(what:="Hello World", After:=Range("B3"), LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
and we need to know if something was found, what's the difference between "If Not sought Is Nothing Then" and "If sought Then"?
Thanks
Re: How to check whether there is value in a variable range?
vb Code:
if not sought is nothing then ' value found as range object
if sought is same as if sought = true, which is never the case, unless the found range contains true