Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Power excel 2016 with mrexcel Master Pivot Tables, Subtotals, Charts, VLOOKUP, IF, Data Analysis in Excel 2010–2013 (Bill Jelen) (z-lib.org).pdf
Скачиваний:
4
Добавлен:
14.08.2022
Размер:
49.75 Mб
Скачать

PART 3: WRANGLING DATA

299

 

 

Figure 767 Two fields in the Column Labels drop zone.

WHY DOES THE PIVOT TABLE FIELD LIST KEEP DISAPPEARING?

Problem: The pivot table tools are there, then they are

3

gone. What is Microsoft’s problem?

 

 

Figure 768 One second they are there, then they are gone.

Strategy: Here is Microsoft’s rationale. They found an Excel 2003 customer who had been living with the

Picture Toolbar for months. There was no picture in the worksheet, and the toolbar was actually getting in the way. Because of this event, Excel now has an obsessive desire to put away the contextual ribbon tabs as soon as you are not using them.

If you build a pivot table and keep the cell pointer within the pivot table, Excel will display the two new ribbon tabs and the PivotTable Field List dialog. But as soon as you click outside the pivot table, Microsoft will put away the ribbon tabs and hide the PivotTable Field List dialog. This drives me crazy. There are many reasons I might want to click outside the pivot table, including these:

● To get a better view of the pivot table ● To shoot a nice screen shot for this book

● I try to click on the PivotTable Field List dialog but miss, instead selecting a cell near the Field List dialog.

● I accidentally press the left mouse button when the mouse pointer had the audacity to not be above the pivot table.

● I type the Right Arrow key to scroll right in a wide pivot table, and I accidentally go one cell too far.

To my friends at Microsoft: There is nothing on Sheet2 except the pivot table. As long as I am looking at Sheet2, I am looking at the pivot table. Quit hiding the ribbon tabs just because I clicked out of the pivot table! The lady who lived with the picture toolbar for six months because she didn’t know how to click the X to close the toolbar should not cause the other 749.999 million people using Excel to suffer.

300

POWER EXCEL WITH MR EXCEL

 

 

To keep everyone happy, how about these rules: If your code renders a picture in the visible window of Excel, show the Picture Tools tab of the ribbon. Even if the picture is not selected, it will at least give me a clue that there are things I can do to the picture. If the ribbon is allegedly to help people discover new features in Excel, then quit hiding important tabs.

Additional Details: The new ribbon interface causes enough stress without it randomly switching to other tabs. If you are working on the PivotTable Tools Design tab and you accidentally arrow out of the pivot table, you will find yourself on the Home tab. Even if you immediately arrow back into the pivot table, you are still on the Home tab.

Maddeningly, Microsoft handled this one bizarre situation but none of the other common situations. Try this:

1. Select a cell in the pivot table.

2. Choose the Design tab of the ribbon.

3. Use the mouse to select exactly one cell outside the pivot table. Excel will hide the pivot table ribbon tabs and the PivotTable Field List dialog.

4. Using the mouse, select a cell back in the pivot table. Excel will redisplay the Design tab.

If you prefer to use the keyboard, you can instead try this: 1. Select a cell in the pivot table.

2. Choose the Design tab of the ribbon.

3. Press the Right Arrow key until you have moved exactly one cell outside the pivot table. Excel will hide the pivot table ribbon tabs and the PivotTable Field List dialog.

4. Using the Left Arrow key, move back into the pivot table. Excel will redisplay the two ribbon tabs, but it will leave you on the Home tab of the ribbon.

However, this similar scenario does not work: 1. Select a cell in the pivot table.

2. Display the Design tab of the ribbon.

3. Use the mouse to select one cell outside the pivot table. Select another cell outside the pivot table. Select a cell inside the pivot table. Excel will not return you to the Design tab.

So, Microsoft went through the incredibly convoluted task of catching when you select exactly one cell outside the pivot table with the mouse and immediately go back to the pivot table using the mouse. The whole situation frustrates me to no end.

MOVE OR CHANGE PART OF A PIVOT TABLE

Problem: If I try to insert a row in a pivot table, I am greeted with a message saying that I cannot change, move, or insert cells in a pivot table.

Figure 769 Excel won’t let you insert a row in a pivot table.

Strategy: You cannot do a lot of things to a finished pivot table. While the flexibility of pivot tables is awe- some, sometimes you just want to take the results of the pivot table and turn off the pivot features. If you want to take the data and reuse it somewhere else, for example, you can convert the pivot table to regular data by using Paste Values. Follow these steps:

1. Select the entire pivot table.

2. Press Ctrl+C to copy.

3. elect Home, Paste dropdown, Paste Values.

This action will change the pivot table from a live pivot table to just values in cells. You can now insert rows and columns to your heart’s content.

PART 3: WRANGLING DATA

 

301

 

 

 

SEE DETAIL BEHIND ONE NUMBER IN A PIVOT TABLE

Problem: One number in my pivot table seems to be wrong. Air Canada does not typically buy XYZ, yet it is shown with that product in the report.

Figure 770 Air Canada should not have any sales for this product.

Strategy: You can see the detail behind any number in a pivot table by double-clicking on the number. Click on the $22,804 for Air Canada XYZ. A new worksheet is inserted to the left of the current sheet, showing all the records that make up the $22,804.

Figure 771 Excel inserts a new sheet with the drill-down detail.

 

Additional Details: If you double-click on a number in the total row or total column, you will see all the

 

records that make up that number. You could even drill down on the Grand Total cell to get a copy of all

 

the original records.

 

3

Gotcha: Each drill-down creates a new worksheet. The new worksheet is just a snapshot in time of what

 

made up the original number. If you detect a wrong number in the drill-down report, you need to go back

 

 

to the original data to make the correction.

 

USE MULTIPLE VALUE FIELDS AS A COLUMN OR ROW FIELD

Problem: When I create a table with two or more Values fields, Excel has those fields stretch across the column fields. Is it possible to change to other layouts?

Strategy: Look for a virtual field in the Column Labels drop zone called Values. This field can be pivoted to another location. It starts out in the column labels:

Figure 772 Values go across the columns initially.

302

POWER EXCEL WITH MR EXCEL

 

 

Drag this virtual field to the Row Labels and you will get a different look to the report.

Figure 773 You can drag Values to the row area.

UPDATE DATA BEHIND A PIVOT TABLE

Problem: I’ve discovered that some of the underlying data in my pivot table is wrong. After I correct a number, the pivot table does not appear to include the change.

Strategy: This is an important thing to understand about pivot tables: When you create a pivot table, all the data is loaded into memory to allow it to calculate quickly. When you change the data on the original worksheet, it does not automatically update the pivot table.

You need to select a cell in the pivot table. The PivotTable ribbon tabs will appear. On the Analyze tab, you click the Refresh icon to recalculate the pivot table from the worksheet data.

Figure 774 After changing the underlying data, refresh the cache.

Results: The pivot table is updated.

Additional Details: Making changes to the underlying data could cause the table to grow. For example, if you re-classify some records from the East region to the Southeast region, be aware that clicking the Re- fresh button will cause the table to grow by one column. If there happens to be other data in that column, Excel will warn you and ask if it is okay to overwrite those cells.

WHY DO I GET A COUNT INSTEAD OF A SUM?

Problem: When I choose Revenue, it goes to the Rows area instead of the Values area. When I drag Rev- enue to the Values area, it defaults to a Count instead of a Sum.