Hi all
I've got an If function that checks whether the active cell value is less than 9 and if so, sends an email.
Problem is, a good 50 entries will be "#NUM!" when I come to run this macro again which will mean I have to write out around 150 emails.
Is there some way of writing an If that will pick up on the #NUM! error?
Currently have the following:
If ActiveCell.Value < 9 Then
ValidDays = ActiveCell.Value
Else
Exit Sub
End Sub
Tried the following:
If ActiveCell.Value < 9 Then
ValidDays = ActiveCell.Value
Else
If ActiveCell.Value = "#NUM!" Then
ValidDays = "0"
End If
End If
Thanks
#####################################
Fix:
If IsError(ActiveCell) Then
ValidDays = "0"
Else
If ActiveCell.Value < 9 Then
ValidDays = ActiveCell.Value
Else
Exit Sub
End If
End If
Bookmarks