Macro qui fonctionne en pas à pas mais pas en automatique
Bonjour à tous,
J'ai une macro dont une partie fonctionne bien en pas à pas mais ne copie pas tout en automatique.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
'Copie données
Sheets(Nchan).Range("A3:B7").Copy
Sheets("Tft").Range("A3:B7").PasteSpecial Paste:=xlValues
Dim a As Variant
a = 0
Dim cell As Range
For Each cell In _
Sheets(Nchan).Range("A9:A313").SpecialCells(xlCellTypeVisible)
Sheets("Tft").Rows(10 + a).Insert Shift:=xlDown
Sheets("Tft").Cells(10 + a, 1) = cell.Value
b = cell.Row
Sheets(Nchan).Cells(b, 7).Copy
Sheets("Tft").Cells(10 + a, 3).PasteSpecial Paste:=xlValues
Sheets("Tft").Range("H9").Copy
Sheets("Tft").Cells(10 + a, 8).PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Sheets(Nchan).Cells(b, 6).Copy
Sheets("Tft").Cells(10 + a, 6).PasteSpecial Paste:=xlValues
a = a + 1
Next |
Pourriez-vous m'aider?
Merci d'avance