Thread: Finding row
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Finding row

You also need to check if the cellis in column A,otherwise, you could get an
error.

"treasuresflemar" wrote:

The following works as it is written, but I can not figure out how to get
check the value in the column to the left of the find.
something like

Set x = Offset(0,1). Range("sales" & CD).Find(CP)

But everything I have tried has returned an error.

Function Checkpost(CP As Date, CD As String)
Dim x

With Worksheets("sales " & CD)
Set x = Range("sales" & CD).Find(CP)
End With

If x Is Nothing Then
Checkpost = True
Else
Checkpost = False
End If
End Function