Thread: Finding row
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
excelent excelent is offline
external usenet poster
 
Posts: 695
Default Finding row

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


"treasuresflemar" skrev:

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