Una famiglia di software per fogli di calcolo Microsoft con strumenti per l'analisi, la creazione di grafici e la comunicazione dei dati.
Ciao IL CREM,
La seguente istruzione :
If Cells(n, 3).Value <> "#N/D"
Mi genera l’errore “tipo non corrispondente”, come posso ovviare al problema e continuare l’elaborazione di un for … next ?
Prova qualcosa del genere:
'=========>>
Option Explicit
'--------->>
Public Sub Tester()
Dim WB As Workbook
Dim SH As Worksheet
Dim res As Variant
Dim n As Long
Set WB = ThisWorkbook
Set SH = WB.Sheets("Foglio1")
With SH
For n = 1 To 10
res = .Cells(n, 3).Value
If IsError(res) Then
If res = CVErr(xlErrNA) Then
Debug.Print .Cells(n, 3).Address(0, 0)
End If
End If
Next n
End With
End Sub
'<<=========
===
Regards,
Norman