Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
Rich (BB code):
With ws_data
.Range("J:J").Clear
For t = 2 To nwb_LastRow
rn_1 = .Cells(t, 3)
temp_fac = .Range("H" & t) & .Range("I" & t)
If Application.WorksheetFunction.CountIf(ws_rd.Range("A:A"), rn_1) = 0 Then
MsgBox "Rental does not exist in the database." & Chr(13) & "You were given lots of notice about processing missed rental information." & Chr(13) & "Now you're paying the price. Process terminated.", vbCritical, "CRITICAL ERROR : Missing Rental Data"
Exit Sub
End If
End With
rn_1 = 84570
This value is found in column A of worksheet ws_rd at row 211.
Is anyone able to suggest why the countif statement (in blue) is failing? It proceeds through the code as though the value doesn't exist (countif = 0)
ws_rd is recognizing the correct worksheet.
Thank you in advance!
Last edited: