ref.Offset(0, 4) = ref.Offset(0, 4) - 1
With Sheets("Historique de conso")
If TextBox1 <> "" Then
Lig = .Cells(.UsedRange.Columns(1).Rows.Count + 1, 1).Row
'MsgBox lig
.Cells(Lig, 1) = ref.Offset(0, -2)
.Cells(Lig, 2) = ref.Offset(0, -1)
.Cells(Lig, 3) = Me.TextBox1.Value
.Cells(Lig, 4) = Date
.Cells(Lig, 5) = 1
End If