jeffreyweir
Board Regular
- Joined
- Jul 3, 2007
- Messages
- 110
Howdy all. i'm trying to copy a whole bunch of tables with identical layount to a master table, so I can create a whole bunch of pivot tables that include data from ALL the various tables. The source tables MAY be filtered, and I can't work out how to copy them easily while also INCLUDING any hidden/filtered rows while at the same time leaving any filter settings on the source tables intact.
If I use something like range("Table1").Listobject.DataBodyRange.Copy then it only copies the VISIBLE rows. But I want ALL rows to be copied to a master table.
1. I don't want to unfilter the sources tables if I can help it, because users might still want the source tables to remain exactly as the user filtered them. (However, it doesn't matter if the DESTINATION list is filtered or not). I realise that I could copy the entire sheet to a temp sheet, then unfilter any tables on that sheet and THEN copy these to the master list. But wan't to know if there's a simpler way.
2. I DON'T want to use SQL to create a pivottable directly from the tables, because the tables will have further information added to them from time to time, and so if I use SQL to make a pivot directly from them, I'll have to recreate the pivotcache using that SQL query each time, which might muck up the settings in any existing pivottables. I realise that I could use SQL to copy the data to a 'staging area', and just point the pivot table at that. But again I was looking for a simpler way if possible.
3. I can't use PowerPivot, because its not installed in this environment.
Anyone got any ideas?
Regards
Jeff
If I use something like range("Table1").Listobject.DataBodyRange.Copy then it only copies the VISIBLE rows. But I want ALL rows to be copied to a master table.
1. I don't want to unfilter the sources tables if I can help it, because users might still want the source tables to remain exactly as the user filtered them. (However, it doesn't matter if the DESTINATION list is filtered or not). I realise that I could copy the entire sheet to a temp sheet, then unfilter any tables on that sheet and THEN copy these to the master list. But wan't to know if there's a simpler way.
2. I DON'T want to use SQL to create a pivottable directly from the tables, because the tables will have further information added to them from time to time, and so if I use SQL to make a pivot directly from them, I'll have to recreate the pivotcache using that SQL query each time, which might muck up the settings in any existing pivottables. I realise that I could use SQL to copy the data to a 'staging area', and just point the pivot table at that. But again I was looking for a simpler way if possible.
3. I can't use PowerPivot, because its not installed in this environment.
Anyone got any ideas?
Regards
Jeff
Last edited: