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

489

 

 

MOVE COLUMNS USING INSERT CUT CELLS

Problem: I need to rearrange two columns. The left-to-right sort trick described in “Move Columns by Sorting Left to Right” seems overly complex.

Strategy: There is a fast way to move a couple of columns. You select the entire column to be moved and use Cut. Then you right-click on the column to the right of where the data should go and choose Insert Cut Cells.

Below, you want to move column B before column A. This will require four clicks. Follow these steps: 1. Right-click the B column label. Choose Cut from the context menu.

Figure 1247 Right-click the column and cut.

2. Right-click the A column label. Choose Insert Cut Cells.

Figure 1248 Cut B and insert cut cells before A.

Results: The entire column will be moved. This is an amazingly simple and fast process.

MOVE ROWS OR COLUMNS WITH SHIFT DRAG

 

 

4

Problem: I need to rearrange some rows or columns. Do you have anything faster than the other methods

you’ve described?

 

 

Strategy: You might find this method faster than the oth- ers:

1. Select an entire row by pressing Shift+Spacebar or select an entire column by pressing Ctrl+Spacebar.

2. Grab the thick border around the row or column.

Hold down the Shift key and drag the row/column to a new location. When you use Shift+drag, Excel will basically cut the cells and then insert them where you release the mouse. Gotcha: The Shift+drag is critical. If you simply drag, you will do a cut and paste. If you Ctrl+drag, you will do a copy and paste.

Both of these will overwrite the destination cells. Figure 1249 Shift-drag the border.

Only Shift+drag will insert the cells.

3.You’ve selected the entire row. Grab the top border while holding down Shift. As you drag, an inser- tion cursor shows where the row would be moved to.

4.Release the mouse. Excel will insert the row and shift the other rows down.

SELECT ALL CELLS USING THE KEYBOARD

Problem: Ctrl+A used to select all cells, but now it selects the current region first. Strategy: Press Ctrl+Spacebar and Shift+Spacebar in either order.

490

POWER EXCEL WITH MR EXCEL

 

 

 

CHANGE THE WIDTH OF ALL COLUMNS WITH ONE COMMAND

Problem: I have a large model set up in Excel.

Some of the columns are hidden. I want to glob- ally change the width of all unhidden columns to a width of 4. If I choose all columns in the worksheet and use Home, Format dropdown, Column Width, the hidden columns will unhide.

Strategy: To solve this problem, you can use Home,

Format dropdown, Default Width.

The Default Width dialog allows you to enter one global column width. This change will affect all columns that have not been previously resized or hidden. The result is that you can change the width of

all columns without unhiding the hidden columns. Figure 1250 Change the default column width.

Additional Details: Changing the default width will change the width of hidden columns, but will not unhide them. When they are later unhidden, they will have the new width.

Gotcha: The Default Width command does not change the widths of columns that have previously been changed. To see this in action, open a new workbook. Manually change column C to be 20 wide. Use Home,

Format dropdown and set Default Width to be 1 wide. All the columns except C will be changed.

COPY COLUMN WIDTHS TO A NEW RANGE

Problem: I have a small report in columns A:G. I made a copy of that report in column H. The column widths did not get copied over. It is a pain to individually look at each column width in A through G and then make the same column width in the new report.

Strategy: First, you don’t have to open the Column Width dialog to see the column width. Between each column header, there is a spot where you can click and drag to change the column width. If you simply click there and

hold the mouse button down without moving the mouse, Figure 1251 Reveal the size of this column. you can see the width of the column.

The fast solution to this problem is to use the rela- tively new Paste Column Widths. You can select A1:G1, press Ctrl+C to copy, select cell H1, and do Alt+E+S+W for Paste Special Column Widths.

Microsoft quietly added Column Widths to the

Paste Special dialog a few versions ago. It is much easier than using the Format Painter on entire columns to copy the column widths.

Figure 1252 Paste only the column widths.

In Excel 2010, the Paste Options dialog has an icon for Keep Source Column Widths. Immediately after copying the report, you could use this paste option to bring the column widths along with the original paste.

Gotcha: Using the W icon will copy the cell contents as well as the column widths. Using Paste Special and then Column Widths will paste the column widths without pasting the data.

PART 4: MAKING THINGS LOOK GOOD

 

491

 

 

 

COPY ROW HEIGHTS

Problem: That last trick for pasting column widths works well. How do I do the same thing for row heights?

Strategy: As with column widths, you can quickly find the row height or adjust the row height using the border between row headers.

Figure 1253 Find or adjust one row height.

There is not a Paste Special option for row heights. YoucanusetheFormatPaintertocopyrowheights. However, the Format Painter will also copy cell col- ors, font sizes, borders, and so on.

To use the Format Painter, select entire rows. Say that you want to copy row heights in rows 1:10 to rows 21:30.

To copy the heights of rows 1:10, click and drag from the row 1 heading to the row 10 heading.

Don’t click any cells while the format painter is active. The next action you have to take is selecting 10 rows. Be sure to click on the row header and not the cell. Click on 21 and drag to 30. The tooltip will confirm that you’ve selected 10 rows.

Click the Format Painter icon in Home tab. The mouse cursor changes to a paintbrush.

Figure 1254 Choose entire rows, then click the Format Painter.

When you release the mouse, Excel will paste all formatting, including row heights from the original range.

Figure 1255 Select as many rows as in the cop-

4

ied section.

USE WHITE TEXT TO HIDE DATA

Problem: My workbook needs extra columns in order to show a graph. I’d like to hide this information from the person using the workbook.

Strategy: Choose the extra cells and choose white text color. To do this, you select Home, Font Color dropdown and choose a white font for the text.

The white font prevents the cells from being visible on screen and from printing.

Additional Details: If you need to troubleshoot these cells, reselect the range. The selection color is dark enough that you can make out the white font in all but the active cell. (Press Ctrl+period to move the active cell to another corner of the selection so you can see the first cell).

Gotcha: Why not just hide the columns? By default, Excel will remove data from a chart when the columns are hidden.

Alternate Strategy: I often take the chart and cover the source data with the chart.

Figure 1256 Change the

font color to white.

492

POWER EXCEL WITH MR EXCEL

 

 

 

HIDE VALUES USING A NUMBER FORMAT

Problem: Why did you use the white font to hide those cells? Isn’t there a custom number format to hide values?

Strategy: Yes. You could select the cells, press

Ctrl+1, then choose Custom and type three semicolons to hide the text in the cell.

Gotcha: While nothing will appear in the cells, if someone selects the cell, they can see the cell formula in the formula bar. If the cell contains a constant (i.e. anything other than a formula), then they will see the cell value as well.

Figure 1258 The cells are hidden, except in the formula bar.

The other problem with this method: if the data is being used in a chart, then the labels along both axis of the chart will be hidden as well. Here is the chart before hiding the data:

Figure 1257 Using ;;; will hide the cell contents.

After hiding the data, the axis labels are gone.

Figure 1260 Axis labels are hidden when the range is hidden.

Figure 1259 Both axis have labels.

HIDE AND UNHIDE DATA

Problem: I need to hide data in a worksheet, but I don’t want to delete it. Is there a way to do this besides using the previous two techniques?

Strategy: Another method for hiding data to simplify a worksheet is to physically hide a row or column.

Say that you want to hide column C. To do this, you select a cell in column C. Then you select Home, For- mat dropdown, Hide & Unhide, Hide Columns. Alternatively, use Alt+O+C+H. Alternatively, right-click the column C heading and choose Hide.

Column C will be hidden.

It is interesting to note that the cell pointer has essentially disappeared. You can see from the Name box that C3 is the active cell. You can also see in the formula bar that the value of C3 is 152. Even though the column is hidden, the active cell is still C3.

Simply press the Left Arrow key or Right Arrow key to move to a visible column to get the cell pointer back.