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 54 55 56 57
| Sub TableauPalette()
Dim FeDo As Worksheet
Dim FeT As Worksheet
Set FeT = Sheets("Feuille Type")
Set FeDo = Sheets("Douchette")
i = 2
Do While FeDo.Cells(i, 1) <> ""
If FeDo.Cells(i, 21) > 0 Then
FeT.Range("F11").Offset(Application.WorksheetFunction.CountA(Range("F11:F29")), 0).Value = FeDo.Cells(i, 1).Value
FeT.Range("G11").Offset(Application.WorksheetFunction.CountA(Range("G11:G29")), 0).Value = FeDo.Cells(i, 2).Value
FeT.Range("H11").Offset(Application.WorksheetFunction.CountA(Range("H11:H29")), 0).Value = FeDo.Cells(i, 21).Value
End If
If FeDo.Cells(i, 22) > 0 Then
FeT.Range("I11").Offset(Application.WorksheetFunction.CountA(Range("I11:I29")), 0).Value = FeDo.Cells(i, 1).Value
FeT.Range("J11").Offset(Application.WorksheetFunction.CountA(Range("J11:J29")), 0).Value = FeDo.Cells(i, 2).Value
FeT.Range("K11").Offset(Application.WorksheetFunction.CountA(Range("K11:K29")), 0).Value = FeDo.Cells(i, 22).Value
End If
If FeDo.Cells(i, 20) > 0 Then
FeT.Range("B11").Offset(Application.WorksheetFunction.CountA(Range("B11:B29")), 0).Value = FeDo.Cells(i, 1).Value
End If
i = i + 1
Loop
End Sub |
Partager