Hi - I am using the following code to search column D for either "Task Description" or "Method of Quoting" and when it finds either of those words, it looks in column E. If column E is empty then it returns an error message box.
Does anyone know if its possible to return the cell address of those blank cells within my message box? I haven't been able to come up with anyting
Does anyone know if its possible to return the cell address of those blank cells within my message box? I haven't been able to come up with anyting
Code:
Sub ShowMissingTextWarning()
'Definitions
Dim FndCell As Range, arr As Variant
On Error Resume Next
For Each arr In Array("Task Description:", "Method of Quoting:")
Set FndCell = Range("D:D").Find(arr, , xlValues, xlWhole).Offset(0, 1)
If FndCell.Value = vbNullString Then
If Err.Number = 0 Then
MsgBox arr & " is missing!", vbExclamation
FndCell.Select
End If
End If
Next arr
On Error GoTo 0
End Sub