Re Bonsoir JC
Sorry j'étais occupé et pas vu tes questions...
C'est assez simple tu peux remplacer cette ligne :
If Left(Worksheets(S).Name, 4) = "Base" Then
Par celle-ci :
If Worksheets(S).Name = "PAYE" Or Worksheets(S).Name = "RENTE" Or Worksheets(S).Name = "RETRAITE" Then
Et le tour est joué... On peut aussi faire un boucle sur une array, mais là les modifs seront plus conséquentes :
Sub Recherche()
Dim C As Range
Dim tablo() As String
Dim Text As String, Titre As String
Dim S As Variant '<<<< Attention Ici !!
Dim Firstaddress As String
Dim I As Integer, X As Integer, L As Integer
Text = InputBox("Taper le Text Recherché", Thierry, "JCA06")
If Text = "" Then Exit Sub
For Each S In Array("PAYE", "RENTE", "RETRAITE")
'Attention Ici plus besoin de If
With Sheets(S).UsedRange
Set C = .Find(Text, LookIn:=xlValues)
If Not C Is Nothing Then
Firstaddress = C.Address
Do
ReDim Preserve tablo(5, I)
tablo(0, I) = C.Value
tablo(1, I) = C.Offset(0, 1).Text
tablo(2, I) = C.Row
tablo(3, I) = Sheets(S).Name
tablo(4, I) = C.Address
I = I + 1
Set C = .FindNext(C)
Loop While Not C Is Nothing And C.Address <> Firstaddress
End If
End With
'Attention Ici plus besoin de End If
Next S
Voilà ce n'est pas non plus trop compliqué.
Bon Week End
@+Thierry