P
p.fournand
Guest
Bonsoir,
quelqu'un a t'il une idée sur le faite que cette fonction trouve la premiere occurence mais plante pour la suite ?
Function RechercheW(Plage As Range, Num, Pile, Rang, Colonne) As Integer
RechercheW = 999
With Plage
Set ou = .Find(Num, LookIn:=xlValues)
'If Not ou Is Nothing Then
firstAddress = ou.Address
Do
If Cells(ou.Row, ou.Column + 1).Value = Pile Then
If Cells(ou.Row, ou.Column + 2).Value = Rang Then
If Cells(ou.Row, ou.Column + 3).Value = Colonne Then
RechercheW = Cells(ou.Row, ou.Column + 46).Value
Exit Function
End If
End If
End If
Set ou = .FindNext(ou.Address)' A la sortie de cette ligne, OU = nothing ????
Loop While Not ou Is Nothing And ou.Address <> firstAddress
End With
Set ou = Nothing
End Function
Merci
Desole, la premier fichier n'avait pas la bonne macro !
quelqu'un a t'il une idée sur le faite que cette fonction trouve la premiere occurence mais plante pour la suite ?
Function RechercheW(Plage As Range, Num, Pile, Rang, Colonne) As Integer
RechercheW = 999
With Plage
Set ou = .Find(Num, LookIn:=xlValues)
'If Not ou Is Nothing Then
firstAddress = ou.Address
Do
If Cells(ou.Row, ou.Column + 1).Value = Pile Then
If Cells(ou.Row, ou.Column + 2).Value = Rang Then
If Cells(ou.Row, ou.Column + 3).Value = Colonne Then
RechercheW = Cells(ou.Row, ou.Column + 46).Value
Exit Function
End If
End If
End If
Set ou = .FindNext(ou.Address)' A la sortie de cette ligne, OU = nothing ????
Loop While Not ou Is Nothing And ou.Address <> firstAddress
End With
Set ou = Nothing
End Function
Merci
Desole, la premier fichier n'avait pas la bonne macro !
Pièces jointes
Dernière modification par un modérateur: