Finding row
Sorry, I explained that all wrong.
CP will always be found in column "A"
There will always be only one occurrence of CP in the range.
It will always be found.
Need to see if the sum of columns "B" through "L" in the row CP is
found in 0
if so then checkpost = false
What I need x to do is return the row number and I can handle the rest, I
think.
Thanks Carl
Function Checkpost(CP As Date, CD As String)
'CP is the date that is being posted
'CD is the Year being posted which is part
'of the named range
'Checkpost returns True if no posting has been made
'to the posting date
Dim x
With Worksheets("sales " & CD)
'sets the sheet the data is on for the year invloved
Set x = Range("sales" & CD).Find(CP).Offset(0, 1)
Set x = Range("sales" & CD).Find(CP)
'selects the correct range
End With
If x Is Nothing Then
Checkpost = True
'Nothing posted to that day
Else
Checkpost = False
'A posting to that date has been done
End If
End Function
|