F
f.launay
Guest
Bonjour le forum,
j'ai récupéré le code ci joint sur le site de J.WALKENBACH
Problème cette fonction plante et je ne trouve pas la solution.
Quelqu'un aurait-il une idée?
Merci d'avance
The LASTINCOLUMN function
Function LASTINCOLUMN(rngInput As Range)
Dim WorkRange As Range
Dim i As Integer, CellCount As Integer
Application.Volatile
Set WorkRange = rngInput.Columns(1).EntireColumn
Set WorkRange = Intersect(WorkRange.Parent.UsedRange, WorkRange)
CellCount = WorkRange.Count
For i = CellCount To 1 Step -1
If Not IsEmpty(WorkRange(i)) Then
LASTINCOLUMN = WorkRange(i).Value
Exit Function
End If
Next i
End Function
j'ai récupéré le code ci joint sur le site de J.WALKENBACH
Problème cette fonction plante et je ne trouve pas la solution.
Quelqu'un aurait-il une idée?
Merci d'avance
The LASTINCOLUMN function
Function LASTINCOLUMN(rngInput As Range)
Dim WorkRange As Range
Dim i As Integer, CellCount As Integer
Application.Volatile
Set WorkRange = rngInput.Columns(1).EntireColumn
Set WorkRange = Intersect(WorkRange.Parent.UsedRange, WorkRange)
CellCount = WorkRange.Count
For i = CellCount To 1 Step -1
If Not IsEmpty(WorkRange(i)) Then
LASTINCOLUMN = WorkRange(i).Value
Exit Function
End If
Next i
End Function