sich selbst erweiternde Tabellen in Excel?

1 Antwort

Vom Beitragsersteller als hilfreich ausgezeichnet

Mir fällt nur ein Weg per VBA ein.

Sub UpdateInhaltsfolie()

    Dim wsInhalt As Worksheet
    Dim ws As Worksheet
    Dim LastColumn As Long
    Dim i As Long

    Set wsInhalt = ThisWorkbook.Sheets("Inhaltsfolie")

    LastColumn = wsInhalt.Cells(1, wsInhalt.Columns.Count).End(xlToLeft).Column

    For Each ws In ThisWorkbook.Sheets
        If ws.Name <> "Inhaltsfolie" Then
            For i = 1 To LastColumn
                If wsInhalt.Cells(1, i).Value = ws.Name Then Exit For
            Next i
            If i > LastColumn Then
                LastColumn = LastColumn + 1
                wsInhalt.Cells(1, LastColumn).Value = ws.Name
                wsInhalt.Cells(2, LastColumn).Formula = "='" & ws.Name & "'!G20"
            End If
        End If
    Next ws
End Sub

b1n2e3 
Beitragsersteller
 30.08.2023, 10:11

Dankeschön :), hatte gehofft es gibt auch einen Weg ohne VBA.