'Calcul de l'énergie cumulée entre les dates/heures de départ et de fin
If (lineStart = 65536 Or lineEnd = 65536) Then
Worksheets("Calcul").Cells(24, "E") = "an error occured, please launch the 'Filter'!"
Worksheets("Calcul").Cells(28, "F") = ""
Else
If (startTD = "" Or endTD = "") Then
Worksheets("Calcul").Cells(24, "E") = "please enter at least a 'start time/date'!"
Worksheets("Calcul").Cells(28, "F") = ""
Else
If lineEnd - lineStart < 0 Then
Worksheets("Calcul").Cells(24, "E") = "'end time/date' must be greater than 'start time/date'!"
Worksheets("Calcul").Cells(28, "F") = ""
Else
Worksheets("Calcul").Cells(24, "E") = ""
For index = lineStart To lineEnd
totalNRJ = totalNRJ + Worksheets("Filter").Cells(index, "B")
Next index
Worksheets("Calcul").Cells(28, "F") = totalNRJ
End If
End If
End If