1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
'première validation de données avec saisie semi_automatique
Range("B" & 15 + x).Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:= _
"=IF(B" & 15 + x & "<>"""",OFFSET(l_jeandot,MATCH(B" & 15 + x & " & ""*"",l_jeandot,0)-1,,COUNTIF(l_jeandot,B" & 15 + x & " & ""*""),1),l_jeandot)"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = False
End With
'2eme liste déroulante faisant référence à la première
Range("C" & 15 + x).Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:= _
"=OFFSET(cel_prenom,MATCH($B$" & 15 + x & ",l_jeandot,0),,COUNTIF(l_jeandot,$B$" & 15 + x & "))"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = False
End With
' et la troisième liste déroulante qui fait référence au 2 premières.
Range("F" & 15 + x).Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:= _
"=OFFSET(cel_nationalite,MATCH(1,(l_jeandot=B" & 15 + x & ")*(l_jeandot_p=C" & 15 + x & "),0),,COUNTIF(l_jeandot_p,C" & 15 + x & "))"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = False
End With |
Partager