Sub Transferer()
Dim shSource As Worksheet
Dim NumAnomalie As Integer
Set shSource = ThisWorkbook.Sheets("Anomalie retour Qualité Récep")
'
' Travailler sur le tableau destination
With ThisWorkbook.Sheets("HISTORIQUE RECEPTION").Range("C3").CurrentRegion
NumAnomalie = Application.Max(.Columns(1)) + 1
' Faire descendre d'une ligne à partir de la 2
.Rows(2).Insert xlShiftDown
'
'Remplir les données de la ligne 2
With .Rows(2)
.Cells(1) = NumAnomalie
.Cells(2) = shSource.Range("A4").Value
.Cells(3) = shSource.Range("B4").Value
.Cells(4) = shSource.Range("C4").Value
.Cells(5) = shSource.Range("A6").Value
.Cells(6) = shSource.Range("B22").Value
.Cells(7) = shSource.Range("D4").Value
.Cells(8) = shSource.Range("B10").Value
End With
End With
shSource.Range("D2") = NumAnomalie
'
' Pour vider les cellules source
' décommenter les lignes suivantes.
' With shSource
' .Range("A4").ClearContents
' .Range("B4").ClearContents
' .Range("C4").ClearContents
' .Range("A6").MergeArea.ClearContents ' plage fusionnée
' .Range("B22").ClearContents
' .Range("D4").ClearContents
' End With
End Sub