une légère absence dans l'adaptation du code.
je ne voulais pas que la fonction soit public et j'ai supprimé Function au lieu de Public.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 Function SerchXls(Myrange As Range, MyCellule As Range, strRecherche, EntierCell As Boolean) As Long ' On Error Resume Next SerchXls = 0 SerchXls = Myrange.Cells.Find(What:=strRecherche, After:=MyCellule, LookIn:=xlFormulas, LookAt _ :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=EntierCell).Row If SerchXls <= MyCellule.Row Then SerchXls = 0 End Function
Partager