I'm working with VBA to replace #N/A values with 0s in an Excel spreadsheet.
The #N/A values in my spreadsheet are the result of the VLOOKUP function.
The problem I'm encountering is that I receive an error every time I try to check for a #N/A value. Currently, I'm trying to detect these values by using the following code:
If (Selection.Offset(r, c).Value = "#N/A" Then
Is there a way to do this without receiving errors?
The #N/A values in my spreadsheet are the result of the VLOOKUP function.
The problem I'm encountering is that I receive an error every time I try to check for a #N/A value. Currently, I'm trying to detect these values by using the following code:
If (Selection.Offset(r, c).Value = "#N/A" Then
Is there a way to do this without receiving errors?