Bonjour !

Envoyé par
fb62840
Désole, voici le code depuis le début.
En retirant les fioritures, code simplifié ainsi :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| Sub Demo1()
Dim Rg As Range, V
V = InputBox(vbLf & "Date ? jj/mm/aa"): If V = "" Then Exit Sub
If Not IsDate(V) Then Beep: Exit Sub
V = CDate(V)
Range("ShDEST!A1:B1").Value = Array(V, "VALEURS")
Set Rg = [B4:BB4].Find(What:=Format(V, "dddd d mmmm yyyy"), LookIn:=xlValues)
If Rg Is Nothing Then
MsgBox "Date non trouvée
", vbExclamation, V
Else
V = Split("Choix fait,Choix non fait", ",")
If Cells(77, Rg.Column).Value = "" Then Range("ShDEST!B2").Value = V(-(Application.CountIf(Cells(79, Rg.Column).Resize(3), "") = 3))
If Cells(82, Rg.Column).Value = "" Then Range("ShDEST!D2").Value = V(-(Application.CountIf(Cells(84, Rg.Column).Resize(3), "") = 3))
Set Rg = Nothing
End If
End Sub |
Si la source n'est pas la feuille active alors évidemment il faut la préciser devant ses cellules …
___________________________________________________________________________________________________________

Merci de cliquer sur

en bas à droite de chaque message ayant aidé puis sur

pour clore cette discussion …
Partager