Re : Dernière cellule, ligne colonne
bonsoir Pierrot,Zazou,Sergio
Sub test()
MsgBox DerCell.Address
' MsgBox DERCELLCURRENT(ActiveCell).Address
End Sub
Sub GetRealLastCell()
'mpfe (doc J@C)
Dim RealLastRow As Long
Dim RealLastColumn As Long
Range("A1").Select
On Error Resume Next
RealLastRow = _
Cells.Find("*", [A1], , , xlByRows, xlPrevious).Row
RealLastColumn = _
Cells.Find("*", [A1], , , xlByColumns, xlPrevious).Column
Cells(RealLastRow, RealLastColumn).Select
End Sub
Function DerCell() As Range
Dim derLi, derCol
On Error GoTo fin
derLi = Cells.Find("*", [A1], , , 1, 2).Row
derCol = Cells.Find("*", [A1], , , 2, 2).Column
Set DerCell = Cells(derLi, derCol)
Exit Function
fin:
Set DerCell = Cells(1, 1)
End Function
à bientôt