ThrottleWorks
Excel Ninja
Hi,
I am checking below mentioned condition in a Loop.
If Column 1 has valid value and Column 2 has value as “#N/A” then I need to update Column 3.
I am getting error while running below mentioned code.
When the Rng value is “#N/A” macro is showing a bug.
I checked the Rng value in immediate window and it shows as Error 2042.
I can replace “#N/A” manually with N/A and run the edited loop.
However I do not know how to check if the Rng value is Error 2042.
Can anyone please help me how to edit below mentioned code so that it will identify “#N/A” from the Rng value.
For Each Rng In Rng7
If Rng.Value <> "#N/A" And Rng.Offset(0, 1).Value = "#N/A" Then
Rng.Offset(0, 2).Value = "Cleared"
End If
Next
I am checking below mentioned condition in a Loop.
If Column 1 has valid value and Column 2 has value as “#N/A” then I need to update Column 3.
I am getting error while running below mentioned code.
When the Rng value is “#N/A” macro is showing a bug.
I checked the Rng value in immediate window and it shows as Error 2042.
I can replace “#N/A” manually with N/A and run the edited loop.
However I do not know how to check if the Rng value is Error 2042.
Can anyone please help me how to edit below mentioned code so that it will identify “#N/A” from the Rng value.
For Each Rng In Rng7
If Rng.Value <> "#N/A" And Rng.Offset(0, 1).Value = "#N/A" Then
Rng.Offset(0, 2).Value = "Cleared"
End If
Next