darryl47nopra
New Member
- Joined
- Nov 26, 2024
- Messages
- 3
- Office Version
- 365
- Platform
- Windows
I have a lot of tables located in the same spreedsheet (placed on different columns different rows), all named table1, table2 etc.
My goal is change the name to their respective "header" located 1 row above and 3 columns to the rigth of each table.
So far I got something like this (but it is not working)
My goal is change the name to their respective "header" located 1 row above and 3 columns to the rigth of each table.
So far I got something like this (but it is not working)
VBA Code:
Sub LoopThroughAllTablesWorksheet()
Dim ws As Worksheet
Dim tbl As ListObject
Set ws = ActiveSheet
For Each tbl In ws.ListObjects
tbl.Names Names:=rngCell.Offset(-1, 2).Value
Next tbl
'End Sub
End Sub