The ordinal 42 could not be located xlive.dll. Click the PivotTable report.
After you create a PivotTable, you can change the range of its source data. For example, you can expand the source data to include more rows of data. However, if the source data has been changed substantially—such as having more or fewer columns, consider creating a new PivotTable. You can change the data source of a PivotTable to a different Excel table or a cell range, or change to a different external data source.
Newer versionsOffice 2007 - 2010Web
What if your connection is not listed?
If your connection is not listed in the Existing Connections dialog box, click Browse for More, and then look for the data source you want to connect to in the Select Data Source dialog box. Click New Source if appropriate, and follow the steps in the Data Connection Wizard, and then return to the Select Data Source dialog box.
If your PivotTable is based on a connection to a range or table in the Data Model, you can choose another Data Model table or connection on the Tables tab. However, if your PivotTable is based on the Workbook Data Model, you can’t change the data source.
What if your connection is not listed?
If your connection is not listed in the Existing Connections dialog box, click Browse for More, and then look for the data source you want to connect to in the Select Data Source dialog box. Click New Source if appropriate, and follow the steps in the Data Connection Wizard, and then return to the Select Data Source dialog box.
If your PivotTable is based on a connection to a range or table in the Data Model, you can choose another Data Model table or connection on the Tables tab. However, if your PivotTable is based on the Workbook Data Model, you can’t change the data source.
You cannot change the source data for a PivotTable in Excel Online. You have to use the desktop version of Excel in order to be able to do that.
Need more help?You can always ask an expert in the Excel Tech Community, get support in the Answers community, or suggest a new feature or improvement on Excel User Voice. See AlsoHow to display table or pivot table name in a cell in Excel?
This article is talking about displaying a specified table or pivot table name in a cell in Excel.
Recommended Excel Productivity Tools
Bring tabbed editing and browsing to Office (include Excel), much more powerful than the browser's tabs. Free Download..
More than300 powerful advanced features for Excel, designed for1500 work scenarios, save70% time for you. Free Download..
Display table or pivot table name in a cell with VBA codeAmazing! Using Efficient Tabs in Excel Like Chrome, Firefox and Safari!Save 50% of your time, and reduce thousands of mouse clicks for you every day!
The following VBA code can help you display a specified table or pivot table name in a cell. Please do as follows.
1. Press the Alt + F11 keys to open the Microsoft Visual Basic for Applications window.
2. In the Microsoft Visual Basic for Applications window, click Insert > Module. Then copy below VBA code into the Module window.
VBA code: Display table or pivot table name in a cell
3. Press the Alt + Q keys to exit the Microsoft Visual Basic for Applications window.
4. Select a blank cell, enter formula =getObjName(A2) into the Formula Bar and then press the Enter key. See screenshot:
Notes:
1. In the formula, A2 is the cell of the table you want to display the name. You can reference any cell of the table range as you need.
2. For displaying pivot table name, please change A2 in the formula to any cell within the pivot table.
Related articles:Recommended Productivity Tools for ExcelKutools for Excel Helps You Always Finish Work Ahead of Time, and Stand Out From Crowd
Brings Tabbed Browsing and Editing to Microsoft Office, Far More Powerful Than The Browser's Tabs
or post as a guest, but your post won't be published automatically.
Loading comment.. The comment will be refreshed after 00:00.
We usually use pivot tables to help analyze and simplify massive amount of data. However, it gets tricky when we add or remove values in our source table, and the pivot table doesn’t automatically update. A dynamic range solves this problem. This step by step tutorial will walk through how to use a dynamic range in Pivot Tables
Setting up the Data
Here we have a table of product orders from January to February.
Figure 1. Data for our pivot table
Pivot Table without a Dynamic Range
First let us create a pivot table without a dynamic range, and try adding some data. Let us see what happens to the pivot table.
Step 1. Select the range of cells that we want to analyze through a pivot table. In this case, we select cells B2:D10.
Step 2. Click the Insert tab, then Pivot Table. This will launch the Create PivotTable dialog box.
Figure 2. Inserting a Pivot Table
Step 3. In the Create PivotTable dialog box, tick Existing Worksheet. Click the bar for Location and then click cell F2. This will position the pivot table in the existing worksheet, at cell F2.
Figure 3. Inserting a pivot table in an existing worksheet
Step 4. In the PivotTable Field List, tick Product and Orders, then drag Month to the Column Labels. This will show the Sum of Orders for each product per month.
Figure 4. Selecting the fields for values to show in a pivot table
Adding more data
Step 5. Now let’s add data for March in cells B11:D14.
Figure 5. Adding more values into our source data
Step 6. Press Ctrl + Alt + Fto refresh the pivot table. We will see that nothing happens. Adding more data to our source table does not automatically expand our PivotTable.
Figure 6. Pivot table not updated after adding more values
Range In Pivot TableWork-around:
We can change the data source to expand the data range.
Click any value in the pivot table, then click Change Data Source under the Options tab.
Click the button beside the Table/Range bar and select cells B2:D14 to expand the data selection.
Figure 7. Changing the data source for our pivot table
Click Yes to the Excel prompt message shown below:
Figure 8. Excel prompt message
The pivot table will then be updated, showing the March data.
Figure 9. Updated pivot table after changing the data source
Removing Data
What happens when we remove data from our table? Let us try and delete the March data from B11:D14 and refresh by pressing Ctrl + Alt + F.
Figure 10. Pivot table not updated after removing some values
The resulting pivot table does not shrink with the data. Instead, the pivot table shows blank spaces taking the place of the deleted data.
The complications arising from adding or removing data will be addressed by using a dynamic range in our pivot table.
Creating a Dynamic Range
We will use the same starting data as the previous example.
Figure 11. Data for pivot table with dynamic range
One method to create a dynamic range is through the OFFSET formula.
Syntax=OFFSET(reference, rows, cols, [height], [width])
Where
Step 1. Click the Formulas tab, then select Name Manager.
Figure 12. Creating a dynamic range through Name Manager
Step 2. In the Name Manager dialog box, click New.
Figure 13. Creating a new range
Step 3. Let us name the range “Data”. In the Refers to bar,enter the formula:
=OFFSET(Sheet1!$B$2,0,0,COUNTA(Sheet1!$B:$B),COUNTA(Sheet1!$2:$2))
Figure 14. Entering the formula for dynamic range
Where
Pivot Table Having a Dynamic Range
Now that we have created a dynamic range, let’s see how it improves our pivot table.
Step 1. Click the Insert tab and select PivotTable.
Step 2. In the Table/Range: bar, enter the name of our dynamic range “Data”.
Step 3. Tick Existing Worksheet
Step 4. Click the bar for Location bar, then click cell F3.
Figure 15. Inserting a pivot table with dynamic range
Note:
We do not want to position our pivot table in row 2 to avoid complicating our dynamic range. Note that in our dynamic range formula, we set the number of columns by counting the non-empty cells in row 2.
Step 5. Create our pivot table by clicking Product and Orders, then dragging Month into the column labels.
Figure 16. Creating our pivot table
Step 6. Now we add more rows into our source table. Add the March data as shown below. Then press Ctrl + Alt + F to refresh the pivot table.
Figure 17. Pivot table automatically expands with more data
The pivot table expands with the data.
Step 7. Now let’s try and remove some values in our source table.
Delete the column “Month” then press Ctrl + Alt + F to refresh.
The pivot table automatically shrinks with our data, showing only the Sum of Orders. .
Figure 18. Pivot table automatically shrinks with less data
With a dynamic range, working with pivot tables becomes easier and more manageable. We can shrink and expand our pivot table effortlessly with any changes in our data.
Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our liveExcelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.
How to group by range in an Excel Pivot Table?
If you specify the date field as row label in a pivot table, you can easily group dates by Week, month, quarter, etc. But, if you specify a number filed as row label, could you group by specified range? Of course yes! This article will guide you to group by the range in an Excel pivot table.
Easily groups cells and calculate by values in another column in Excel
With Kutools for Excel’s Advanced Combine Rows feature, you can quick group all cells of one column based on values in another column, or calculate (sum, count, average, max, etc.) these cells by the values in another column at ease!Full Feature Free Trial 60-day!
Recommended Excel Productivity Tools
Bring tabbed editing and browsing to Office (include Excel), much more powerful than the browser's tabs. Free Download..
More than300 powerful advanced features for Excel, designed for1500 work scenarios, save70% time for you. Free Download..
Amazing! Using Efficient Tabs in Excel Like Chrome, Firefox and Safari!Save 50% of your time, and reduce thousands of mouse clicks for you every day!Group by range in an Excel Pivot Table
Supposing I have a table of student scores as below screenshot shown. Now I need to count the number of students by score range. Please follow steps to get it done.
1. Select the table, and click Insert > PivotTable.
2. In the Create PivotTable dialog box, please select a destination range to place the pivot table, and click the OK button. See screenshot:
3. Now go to the PivotTable Fields pane, please drag and drop Score field to the Rows section, and drag and drop Name field to the Values section.
4. Go to the pivot table, right click any score in the Row Labels column, and select Group from the context menu. See screenshot:
5. Now the Grouping dialog box comes out. The smallest score and largest score are extracted and entered into the Starting at and Ending at boxes separately. Please enter interval into the By box, and click the OK button.
Now you will see the scores are grouped in the pivot table. See screenshot:
Related articles:Recommended Productivity Tools for ExcelKutools for Excel Helps You Always Finish Work Ahead of Time, and Stand Out From Crowd
Brings Tabbed Browsing and Editing to Microsoft Office, Far More Powerful Than The Browser's Tabs
or post as a guest, but your post won't be published automatically.
Loading comment.. The comment will be refreshed after 00:00.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |