1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
Public Function rvw(target As Range, maPlage As Range, numColonne As Integer) As Range
Dim retour As Range
Dim i As Integer
i = 0
retour = Null
'la premiere condition de mon while est fausse, si il y a une case vide on ne parcour pas tout le tableau passé en paramètre..
Do While maPlage.Offset(i,0).value!=null and maPlage.Offset(i,0).value!=target.Value
i = i + 1
Loop
If maPlage.Offset(i,0).value=target.Value then retour.Value=maPlage.Offset(i,numColonne).value
End if
set rvw =retour
End Function |
Partager