Bonsoir Bobhenne, le forum,
Pour nommer tes plages, je t'avais déjà répondu:
Tu dois le faire pour chaque cuve....
Pour ta liste déroulante, attention, les noms doivent s'appeler exactement comme le nom de tes plages (attention aux espaces).
J ai ouvert vba et ajouter ton code dans un module
Attention, il y a 2 codes...
Module de la feuille où se situe la liste déroulante:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("A1")) Is Nothing Then
Call choixcuve 'appelle la macro choixcuve
End If
End Sub
Module standart:
Sub choixcuve()
Dim mavariable
mavariable = Sheets("Feuil1").Range("A1").Value
On Error Resume Next
Range(mavariable).Cells(1).Copy Sheets("Feuil1").Range("B1")
Range(mavariable).Cells(2).Copy Sheets("Feuil1").Range("B2")
Range(mavariable).Cells(3).Copy Sheets("Feuil1").Range("B3")
Range(mavariable).Cells(4).Copy Sheets("Feuil1").Range("B4")
Range(mavariable).Cells(5).Copy Sheets("Feuil1").Range("B5")
Range(mavariable).Cells(6).Copy Sheets("Feuil1").Range("B6")
If Err <> 0 Then
Sheets("Feuil1").Range("B1:B6") = ""
MsgBox "La plage n'existe pas"
End If
End Sub
Bon réveillon !