Dim i as long Dim MaRef as String Dim MaQuantite as Long i=1 Do While cells(i,1).value<>"" 'A1 if cells(i,2).value=MaRef then 'B1 cells(i,3).value=cells(i,3).value+MaQuantite 'C1 end if i=i+1 Loop
Option Explicit Sub Bouton1_Cliquer() dim i as long i=1 do while cells(i,6).value<>"" 'F1 select case cells(i,6) 'F1 case "a" cells(i,2).value=cells(i,9).value 'B1, I1 case "b" cells(i+1,2).value=cells(i,9).value 'B2, I1 case "c" cells(i+2,2).value=cells(i,9).value 'B3, I1 case "d" cells(i+3,2).value=cells(i,9).value 'B4, I1 end select i=i+1 loop End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question