Gruppe
Allgemein
Problem
Wie kann ich die Lücken in einer in Spalte A stehenden Zahlenreihe in Spalte B auflisten?
StandardModule: basMain
Sub LueckenListen()
Dim iRow As Integer, iRowT As Integer
Dim lTmp As Long
Columns(2).ClearContents
iRow = 1
iRowT = 1
Do Until IsEmpty(Cells(iRow + 1, 1))
lTmp = Cells(iRow, 1)
Do Until lTmp = Cells(iRow + 1, 1) - 1
lTmp = lTmp + 1
Cells(iRowT, 2) = lTmp
iRowT = iRowT + 1
Loop
iRow = iRow + 1
Loop
End Sub