1
I am creating a macro to erase the values of the cell that contains #N/D, but it gives me presents (Error at runtime '13')
When I put #N/A the code works.
Someone can help me solve the problem?
Private Sub CommandButton1_Click()
'percorre da linha 2 até a última preenchida em A
For i = 2 To Cells(Rows.Count, 1).End(xlUp).Row
'se em B for #N/D
If Cells(i, 2) = "#N/D" Then
'apaga conteúdo de A
Cells(i, 2).ClearContents
End If
'próxima linha
Next i
End Sub
You can format the text of your question so you can get better at understanding.
– Edu Mendonça
@Doctor stephenstrange got better ?
– John Hebert
It was very Show!!!
– Edu Mendonça
@Phd stephenstrange excel does not accept #N/D as a value, when I execute the code it presents me an error called: " Runtime error '13' " But if I change #N/D to any other example text #N/A it accepts.
– John Hebert
Old is not understand of vba anymore, calm hold on come help you the, pt.stackoverflow.com have many people who can do this.
– Edu Mendonça