Sub histo()
Dim fDv As Worksheet, fH As Worksheet, cel, col
Dim i&, j&, derln&, lgn&, lnDL&
Set fDv = Sheets("Devis")
Set fH = Sheets("données")
cel = Array("C13", "G2", "G3", "G4", "G5", "G6", "G7", "D8")
col = Array("A", "B", "E", "F", "G", "H", "I", "J", "K")
lnDL = fDv.Range("C" & Rows.Count).End(xlUp).Row
i = 20
While fDv.Range("B" & i).Formula <> ""
i = i + 1
Wend
derln = i - 1
For i = 20 To derln
lgn = fH.Range("A" & Rows.Count).End(xlUp)(2).Row
fH.Range("A" & lgn) = fDv.Range("H12")
'fH.Range("A" & lgn).Value = DateValue(format(fDv.Range("H12").Value, "dd/mm/yyyy"))
'If IsDate(fDv.Range("H12")) Then fH.Range("A" & lgn) = CDate(fDv.Range("H12"))
If Left(fDv.Range("B17"), 13) = "Commercial : " Then
fH.Range("B" & lgn) = Split(fDv.Range("B17"), " ")(2)
Else
fH.Range("B" & lgn) = fDv.Range("B17")
End If
For j = 0 To 7
fH.Cells(lgn, j + 3) = fDv.Range(cel(j))
Next j
For j = 0 To 8
fH.Cells(lgn, j + 11) = fDv.Range(col(j) & i)
Next j
fH.Range("T" & lgn) = fDv.Range("D" & lnDL)
fH.Range("U" & lgn) = fDv.Range("H" & lnDL)
fH.Range("T" & lgn) = fDv.Range("D41")
fH.Range("U" & lgn) = fDv.Range("H41")
fH.Range("V" & lgn) = fDv.Range("H43")
Next i
End Sub