Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a spreadsheet that I import different amounts of data to each
day, overwriting the previous days each time. I want to automate the production of a Pivot Table based on the data in the spreadsheet. I know I can use the PivotTableWizard which refers to a named range "Database" if it exists. I have the following code:- Public Sub SetNameRange() Worksheets("Data").Activate ActiveSheet.UsedRange.Select Sheets("Data").Names.Add Name:="Database", RefersTo:=ActiveSheet.UsedRange.Select End Sub This selects the used range but will not add the name to the spreadsheet. Does anyone have any idea where i am going wrong? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
automating external linked pivot table | Excel Discussion (Misc queries) | |||
Automating grouping of Excel pivot field | Excel Discussion (Misc queries) | |||
Automating grouping of Excel pivot field | Excel Worksheet Functions | |||
automating a process in pivot tables | Excel Programming | |||
automating a pivot table | Excel Discussion (Misc queries) |