• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Table Names

If you only want to view all the names (without writing to a range), you can do so in the Name Manager. From Formulas tab --> Name Manager --> Filter (top right) --> Table Names.

I hope that helps.

Regards,
Ken
 
Hello Hansam

Not sure about excel formula, but can be done with excel vba...

Try this!

Code:
Sub ListWorkSheetNamesNewWs()

Dim xWs As Worksheet
On Error Resume Next
Application.DisplayAlerts = False
xTitleId = "KutoolsforExcel"
Application.Sheets(xTitleId).Delete
Application.Sheets.Add Application.Sheets(1)
Set xWs = Application.ActiveSheet
xWs.Name = xTitleId
For i = 2 To Application.Sheets.Count
    xWs.Range("A" & (i - 1)) = Application.Sheets(i).Name
Next
Application.DisplayAlerts = True
End Sub
 
Try this :-
Code:
Sub ListTables()
Dim tbl As ListObject
Dim WS As Worksheet
Dim i As Single

i = 1

For Each WS In Worksheets
    For Each tbl In WS.ListObjects
        Range("A1").Cells(i, 1).Value = tbl.Name
        i = i + 1
    Next tbl

Next WS

End Sub
 
Back
Top