Sub Repérage3_dependants_noms()
Dim WS As Worksheet
Dim nm As Name
Dim i As Integer
Dim RangeRef As Range
Dim RangeRefPrem As Range
' Balayage des Noms du Gestionnaire des noms
i = 1
For Each nm In ActiveWorkbook.Names
If InStr(nm.RefersTo, "#REF") Then
RechRef = nm.RefersTo
i = i + 1
ActiveSheet.Cells(i, 1) = "'" & nm.Name
ActiveSheet.Cells(i, 2) = "'" & nm.RefersTo
End If
Next nm
' Balayage des feuilles
i = 1
For Each WS In ThisWorkbook.Worksheets
If WS.Name <> ActiveSheet.Name Then
For Each RangeRef In WS.UsedRange
If IsError(RangeRef) Then
If CVErr(RangeRef) = CVErr(xlErrRef) Then
i = i + 1
With ActiveSheet
.Cells(i, 3) = WS.Name
.Cells(i, 4) = RangeRef.Address
.Cells(i, 5) = "'" & RangeRef.Formula
End With
End If
End If
Next RangeRef
End If
Next WS
End Sub