Just see the code below it throws run-time error 13:Type mismatch. I feel very strange, why can't we compare value in cell when it is #N/A Can anyone explain why is this?
Sub test()
MsgBox Cells(1, 1).Value
Sheet2.Cells(1, 1).Value = "#N/A"
If Sheet2.Cells(1, 1).Value = "#N/A" Then
MsgBox "iN TRAP"
End If
End Sub
Thanks,
Ogo
Sub test()
MsgBox Cells(1, 1).Value
Sheet2.Cells(1, 1).Value = "#N/A"
If Sheet2.Cells(1, 1).Value = "#N/A" Then
MsgBox "iN TRAP"
End If
End Sub
Thanks,
Ogo