Attribute VB_Name = "DerniereLigneOccupee"

' 3 fonctions pour renvoyer la dernière ligne occupée
' d'une colonne donnée ou d'une feuille de calcul

Function lLastRow(wks As Worksheet, lCol As Long) As Long
'Robert Rosenberg, mpep
'feuille et colonne au choix
  lLastRow = wks.Cells(65536, lCol).End(xlUp).Row
End Function

Function DerLi()
'd'après David Mac Ritchie, mpep
'feuille active
Dim LastRow As Long
  ActiveSheet.UsedRange
  LastRow = Cells.SpecialCells(xlLastCell).Row
  DerLi = LastRow
End Function

Function LastRow()
'd'après Tom Ogilvy, mpep
'feuille active, colonne A
  LastRow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
End Function




