Greetings,
I am receiving a type mismatch error in the code below:
I understand the problem more or less, but am stumped as to find a simple solution.
As I understand it if the property or variable is not of the correct type then its going to cause the mismatch error.
I am receiving the error when the contents of the cell being compared to "" is "#VALUE!"
I would like to be able to filter for any and all types of things without the risk of a mismatch.
Ideally I would be able to write something like:
I am receiving a type mismatch error in the code below:
Code:
If Cells(b, "A").Value = "" Then Rows(b).Delete
End If
I understand the problem more or less, but am stumped as to find a simple solution.
As I understand it if the property or variable is not of the correct type then its going to cause the mismatch error.
I am receiving the error when the contents of the cell being compared to "" is "#VALUE!"
I would like to be able to filter for any and all types of things without the risk of a mismatch.
Ideally I would be able to write something like:
Code:
If Cells(b, "A").Value = "" or "#VALUE!" or "N/A" Then
Rows(b).Delete
End If