Function LastValue(Pos)
Dim T, DerLig As Integer, i As Integer
LastValue = ""
DerLig = Range("A65500").End(xlUp).Row
T = Range("A2:F" & DerLig)
For i = DerLig - 1 To 1 Step -1
If T(i, 1) > 0 Or T(i, 2) > 0 Or T(i, 3) > 0 Or T(i, 4) > 0 Or T(i, 5) > 0 Or T(i, 6) > 0 Then
LastValue = T(i, Pos)
Exit Function
End If
Next i
End Function