Option Compare Text 'la casse est ignorée
Sub Lance()
Dim chemin$, PC$, source As Range, col%, w As Worksheet, R As Range, n&, nn&, c As Range
chemin = ThisWorkbook.Path
PC = Dir(chemin & "\*.xls") ' premier fichier
Set source = [A2:A6] 'valeurs à rechercher
Application.ScreenUpdating = False
On Error Resume Next 'si aucune SpecialCell
source.Columns(3).EntireColumn.Resize(, Columns.Count - 2).Delete 'RAZ
source.Columns(2) = ""
col = 2
While PC <> ""
If PC <> ThisWorkbook.Name Then
With Workbooks.Open(chemin & "\" & PC)
For Each w In .Worksheets
col = col + 1
source(0, col) = .Name & "!" & w.Name
Set R = Nothing: n = 0: nn = 0
For Each c In source
If CStr(c) <> "" Then
w.Cells.Replace c, "#N/A", xlWhole
Set R = w.Cells.SpecialCells(xlCellTypeConstants, 16)
n = R.Count - nn
nn = nn + n
If n Then
c(1, 2) = c(1, 2) + n 'comptage
c(1, col) = n
End If
End If
Next c
If Application.Sum(source.Columns(col)) = 0 Then source(0, col) = "": col = col - 1 'annulation
R = ""
For Each R In R.Offset(1)
If R Like "*--*" Then R = ""
Next R, w
.Close True 'enregistre et ferme le fichier
End With
End If
PC = Dir
Wend
source(0, 3).Resize(, Columns.Count - 2).Columns.AutoFit 'ajustement largeurs
End Sub