R
ryguy7272
Struggling with the code below:
Sub CopyData10()
Dim rng As Range, cell As Range
Dim rw As Long
Set rng = Worksheets("diego").Range("AB2:AB630")
rw = 1
For Each cell In rng
If cell.Value = "#N/A" Then
Worksheets("Summary Sheet").Cells(rw, "C") = cell.Offset(0, -1)
rw = rw + 1
End If
Next
End Sub
The code fails on this line. i guess there is not an equivalent of #N/A in
VBA. What do I need to use? By the way, the #N/A is the result of a
function; it is not hard-coded.
Thanks,
Ryan---
Sub CopyData10()
Dim rng As Range, cell As Range
Dim rw As Long
Set rng = Worksheets("diego").Range("AB2:AB630")
rw = 1
For Each cell In rng
If cell.Value = "#N/A" Then
Worksheets("Summary Sheet").Cells(rw, "C") = cell.Offset(0, -1)
rw = rw + 1
End If
Next
End Sub
The code fails on this line. i guess there is not an equivalent of #N/A in
VBA. What do I need to use? By the way, the #N/A is the result of a
function; it is not hard-coded.
Thanks,
Ryan---