I have a data where if #n/a found on 2nd cell, then 1st cell value will replace the 2nd cell value. below code is working fine but whenever any blank value is in 1st cell code skip that steps and #n/a remains as it is.
Please assist
Please assist
Code:
Sub NAFILL()
For Each r In Columns(1).SpecialCells(2)
If InStr(r.Offset(0, 1).Text, "#N/A") > 0 Then
r.Offset(0, 1).Value = r.Value
End If
Next r
End Sub
Attachments
Last edited by a moderator: