1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
iLSTT = 0
With FExcel.Range(FExcel.Cells(1, 1), FExcel.Cells(65536, 256))
Set PlageSTT = FExcel.Range(FExcel.Cells(1, 1), FExcel.Cells(65536, 256)).Find(what:="Sous total", LookIn:=xlValues, searchorder:=xlByRows, SearchDirection:=xlNext, MatchCase:=True) ', searchorder:=xlByColumns)
If Not PlageSTT Is Nothing Then
FirstAddress = PlageSTT.Address
ReDim Preserve LSTT(iLSTT)
LSTT(iLSTT) = PlageSTT.Row
iLSTT = iLSTT + 1
Do
Set cell = FExcel.Range(PlageSTT.Address).Offset(rowoffset:=1, columnoffset:=0)
Set PlageSTT = cell.Find(what:="Sous total", LookIn:=xlValues, searchorder:=xlByRows, SearchDirection:=xlNext, MatchCase:=True)
ReDim Preserve LSTT(iLSTT)
LSTT(iLSTT) = PlageSTT.Row
iLSTT = iLSTT + 1
Loop While Not PlageSTT Is Nothing And PlageSTT.Address <> FirstAddress
End If
End With
ReDim Preserve LSTT(iLSTT - 2) |
Partager