Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
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 4: MAKING THINGS LOOK GOOD

493

 

 

Figure 1262 Initially, the active cell is in the hidden column.

Additional Details: Immediately after you hid column C, the active cell was still in column C, so you used an arrow key to move out of the hidden column. Once you’ve arrowed out of the hidden column, you cannot arrow back into it. However, if you type C3 in the Name box—the area that contains the active cell address to the left of the formula bar—and press Enter, Excel will once again select a cell in the hidden column. This can be a handy trick for seeing a value in a hidden cell. You can also use the up and down arrow keys to move

Figure 1261 Hide the column. through column C, seeing each value one at a time.

To unhide column C, you click the B heading and drag to the right to select the entire range B:D. Select Format, Hide & Unhide, Unhide Columns.

What happens if you need to unhide column A? You can’t really select something to the left of A to use the trick just described, but you can follow these steps:

1. Click the column letter B.

2. Drag up and to the left so that the mouse is above row 1. The difference is subtle, but you have now selected columns B and A. Select Format, Column, Unhide.

GROUP COLUMNS INSTEAD OF HIDING THEM

 

 

 

 

 

 

4

Problem: I have a report with months and quarters. My manager sometimes wants the reports printed

with months hidden and other times with the months showing. It is a pain to hide/unhide the four groups

 

 

of monthly columns.

 

 

 

Strategy: You can group the columns instead of hiding and unhiding them. Follow these steps:

 

1.

 

Unhide all the columns.

 

 

 

2.

 

Select the headings Jan, Feb, and Mar. Select Data, Group, Columns. Excel adds a group and outline

 

3.

 

symbol above the column headings.

 

 

 

 

Repeat step 2 for Apr, May, Jun; Jul, Aug, Sep; and Oct, Nov, Dec.

 

 

Excel will draw in Group & Outline buttons above

You can click the 1 Group & Outline button to col-

 

 

the spreadsheet.

lapse to quarters. Click the 2 to show months.

 

Figure 1263 Excel adds group and outline icons like with subtotals.

Figure 1264 The 1 and 2 Group & Outline buttons toggle between views.

494

POWER EXCEL WITH MR EXCEL

 

 

 

HIDE ERROR CELLS WHEN PRINTING

Problem: I have a formula that does division. Occasionally, the divisor cell is zero, so I have a couple of

#DIV/0! value errors. I need to print this sheet with- out the errors to get the report to a staff meeting. I don’t have time to rewrite all the formulas to test whether the divisor is zero. What can I do?

Figure 1265 A few nagging error cells.

Strategy: From the Page Layout tab, you can select the dialog launcher at the bottom right corner of the Page Setup group. In the Page Setup dia- log, you go to the Sheet tab, select the dropdown for (Print) Cell Errors As, and select <blank>.

Figure 1266 Select to print error cells as blank.

Results: Although the error will still appear in the worksheet, when you print, the error cells will print as blanks.

Figure 1267 No errors will show in the printed document.

Alternate Strategy: The ultimate way to solve this problem is to change the formula to test whether the divisor is zero. In this case, a proper formula would be =IFERROR(B2/C2,0).

UNHIDE ALL SHEETS

Problem: If you use Group Mode, you can hide a bunch of worksheets in one command.

Figure 1268 Hide many worksheets in one command.

However, there is no way to unhide all of the work- sheets in a single command. You have to do Home, Format, Hide & Unhide, Unhide Sheets to get to this dialog. You can not select multiple worksheets here, so you have to repeat that command for every worksheet.

Strategy: Use the View Manager. Create one view with the worksheets hidden. Create another view with the worksheets visible.

Figure 1269 Unhide sheets one at a time.

PART 4: MAKING THINGS LOOK GOOD

495

 

 

To solve the current problem, follow these steps: 1. Select View, Custom Views, Add.

2. Assuming the worksheets are currently hidden, use a name such as SheetsHidden.

3. Unhide all the worksheets. If you want a quick way to do this, press Alt+F11. Press Ctrl+G.

Type “for each w in activeworkbook.Worksheets : w.visible = true : next” and press Enter. Press Alt+Q.

4. Now that the worksheets are unhidden, select

View, Custom Views, Add. Use a name such as Unhidden.

5. To quickly switch between the two views, use

View, Custom Views. Select the correct view and click Show.

Figure 1270 Set up a view to remember which sheets to hide.

Figure 1271 Switch to a different view.

Gotcha: If any of your worksheets use a table, you can not use views. In this case, I would add a macro to your personal macro workbook with the code from step 3. For a demo of this, search YouTube for Learn Excel 611.

VERY HIDE A WORKSHEET

Problem: I don’t want people unhiding my worksheets. I have one guy in accounting who always goes to

Home, Format, Hide and Unhide, Worksheets to see what is hidden.

Strategy: There is a Very Hidden setting. Worksheets that are Very Hidden will not appear in the Unhide

Worksheets dialog.

To change a worksheet to Very Hidden, follow these steps:

1. Press Alt+F11 to open VBA.

2. Press Ctrl+R to open the Project Explorer pane.

3. Find your workbook in the Projects list. If you can’t see the worksheets under the Workbook, use the + icon to the left of your workbook. If necessary, click the + sign next to Microsoft Excel Objects so you can see the list of worksheets.

4. Click once on the worksheet name you want to hide.

5. Press F4 to display the Properties pane.

6. Open the dropdown for Visible and choose 2 - xlSheetVeryHidden.

7. Alt+Q to close VBA and return to Excel.

4

Figure 1272 Expand the tree view until you find the worksheet that you want to hide.

Figure 1273 Change to Very Hidden.

ORGANIZE YOUR WORKSHEET TABS WITH COLOR

Problem: I have a lot of tabs in a workbook. Can I highlight the frequently used tabs in red?

Strategy: You can right-click a tab and choose Tab Color to assign a color to a worksheet tab.

496

POWER EXCEL WITH MR EXCEL

 

 

Figure 1274 Add color to the worksheet tabs.

Gotcha: You can see the tab colors of all but the active sheet. The active sheet appears with a mostly white tab and only a tiny swatch of color.

Additional Details: If you choose Theme Colors for your worksheet tabs, the tab colors will change if you choose a new theme.

COPY FORMATTING TO A NEW RANGE

Problem: I have several similar report sections on a spreadsheet. When I get the first report nicely for- matted, I would like to copy the format to the other reports.

Strategy: You can use Paste Special Formats to copy just the formats from one range to another: 1. Select cells A1:E6. Ctrl+C to Copy.

2. Select the upper-left corner of the next section. Open the Paste dropdown on the Home tab. Select the Paste Formats icon.

Figure 1275 Copy the formatting to other report sections.

Gotcha: If the target range contains any merged cells, you can not simply select the top left cell as indicated in step 2. Instead, you must select a rectangular range of the same size and shape as the range copied in step 1.

3. Move the cell pointer to the next section. Repeat the Paste Formatting command. 4. Repeat for any additional sections.

Results: The cell formats will be copied, but their values and formulas will not.

Alternate Strategy: You can also use Format Painter mode to copy formats. You select A1:E6, doubleclick the Format Painter icon in the Home ribbon tab, and click A8 and A15. At each click, Excel will copy the formats to the new range. When you are finished, you can either click the Format Painter icon or press

Esc to exit Format Painter mode.