M
Mike
Hi. In the following code I have an "If" statement if the cell is not found.
How would I rephrase this if statement to execute if the cell was not found?
With Worksheets("Issues Only").Range("b:b")
Set FoundCell = .Cells.Find(What:=pn2, _
After:=.Cells(1), LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False, SearchFormat:=False)
End With
If FoundCell Is Nothing Then
rownum = FoundCell.Row
issued = issued + Cells(rownum, 4)
issdoll = issdoll + Cells(rownum, 5)
End If
How would I rephrase this if statement to execute if the cell was not found?
With Worksheets("Issues Only").Range("b:b")
Set FoundCell = .Cells.Find(What:=pn2, _
After:=.Cells(1), LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False, SearchFormat:=False)
End With
If FoundCell Is Nothing Then
rownum = FoundCell.Row
issued = issued + Cells(rownum, 4)
issdoll = issdoll + Cells(rownum, 5)
End If