View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kevin Porter Kevin Porter is offline
external usenet poster
 
Posts: 38
Default Nulls within a .Find command

Here is the code:

With Workbooks("Workbookname.xls").Sheets("Total").Rows (1)

ColToFind = .Find(What:="What I am looking for",
After:=.Cells(.Columns.Count), _
SearchOrder:=xlByRows).Column

End With

The problem is sometimes ColToFind is not going to be there. I need a way
to tell it that if ColToFind comes back null then do not continue the module.