M
maciej.grzywna
Hi,
i have a problem with one of my column, i want to get rid of #N/D! and
0 values, but leave the rest. I have already coverted #N/D! to text
format, but following piece of vba doesn't work. Whats wrong with it?
TIA
Maciek
Sub test2()
Dim iLastRow As Long
With ActiveSheet
iLastRow = .Cells(.Rows.count, "A").End(xlUp).Row
For i = 2 To iLastRow
If .Cells(i, "V").Value = "#N/D!" Then
.Cells(i, "V").Value = ""
ElseIf .Cells(i, "V").Value = "0" Then
.Cells(i, "V").Value = ""
End If
Next i
End With
End Sub
i have a problem with one of my column, i want to get rid of #N/D! and
0 values, but leave the rest. I have already coverted #N/D! to text
format, but following piece of vba doesn't work. Whats wrong with it?
TIA
Maciek
Sub test2()
Dim iLastRow As Long
With ActiveSheet
iLastRow = .Cells(.Rows.count, "A").End(xlUp).Row
For i = 2 To iLastRow
If .Cells(i, "V").Value = "#N/D!" Then
.Cells(i, "V").Value = ""
ElseIf .Cells(i, "V").Value = "0" Then
.Cells(i, "V").Value = ""
End If
Next i
End With
End Sub