Get Tables Name from Workbook

hatahetahmad

New Member
Joined
Jan 8, 2016
Messages
31
Hi I have a work book and i have many tables in it

How Can I Get Tables Name in Range To Make Drop Down List
Only Tables Name

For Example: I have 6 tables in workbook
I need To make new sheet (ex.Sheet7) that contain tables name

So in "Sheet7"
"A1=Table1"
"A2=Table2"
"A3=Table3"
"A4=Table4"
"A5=Table5"
"A6=Table6"

Like That :)
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hi, try the following solution. Create a new worksheet, right click on sheet tab and select "View code". Paste the code, go back to Excel and run the macro.

Code:
Sub List_Tables()

    Dim ws As Worksheet
    Dim table As ListObject
    
    i = 1
    
    For Each ws In ThisWorkbook.Worksheets
        
        For Each table In ws.ListObjects
            Cells(i, 1).Value = table.Name
            i = i + 1
        Next table
        
    Next ws

End Sub
 
Upvote 0

Forum statistics

Threads
1,223,249
Messages
6,171,031
Members
452,374
Latest member
keccles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top