Private Sub CommandButton1_Click()
Dim C As Range, n As Long, Li As Long, Dli As Long, Txte As String
Dli = Cells(Rows.Count, 1).End(xlUp).Row
For Each C In Range("A1:A" & Dli)
n = n + 1
If Left(C, 1) <> "=" And C <> "" Then Li = n
Next
Txte = Li & " " & Cells(Li, 1) & Chr(10) & Dli & " " & Cells(Dli, 1).Formula
MsgBox Txte, vbExclamation, "dernières lignes de A"
End Sub