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

485

 

 

Figure 1236 If you look quickly, the 1.5 appears smaller than 3.5.

Format the cells using Ctrl+1. Choose the Number tab and then the Custom category. Change the custom format code from 0.00E+00 to ##0.0E+00.Excel will now display the cells as you wish.

Figure 1237 Column E

FILL A CELL WITH ASTERISKS

Problem: I want to fill the blanks to the left of a number with asterisks like a check-printer would do.

Strategy: When you are entering a custom format, the asterisk symbol says to use the next character to fill the blanks in the cell. I realize this is really confusing, but using **0 tells Excel to use the second aster- isk to fill to the left of the number with asterisks. Using *+ tells Excel to fill with plus signs. An asterisk with any character will fill with that character. As the cell gets wider, the number of repeating characters increases.

The ** can go after or before the digits. Column B shows the number format used to achieve the look in column A.

4

Figure 1238 Various repeating character formats.

I TYPE 152 AND GET 1.52

Problem: In my copy of Excel, I type 152 and Excel enters 1.52. What is going on?

Strategy: That sounds like a great problem to have? How did you do it?

There is a setting in Excel options to automatically insert a decimal point and a number of decimal places when you type a number. To access it, go to File, Options. Choose the Advanced category. The second setting in Advanced is Automatically Insert a Decimal Point. Choose that setting, and then select the number of decimal places.

486

POWER EXCEL WITH MR EXCEL

 

 

Figure 1239 This setting affects all worksheets.

Now, when you enter any number, Excel will divide it by 100.

Not having to type the decimal point can speed data entry of dollars and cents.

Gotcha: This setting does not just affect the current worksheet. It is global to all workbooks that you open on this computer. If you had some data entry to do, you could turn on the setting, do the data entry, then turn the setting back off.

USE CELL STYLES TO CHANGE FORMATS

Gurus of Microsoft Word have known about using styles for two decades. Microsoft promotes styles in Ex- cel, adding a dropdown right on the Home tab offering 42 built-in styles.

Figure 1240 Excel offers 42 built-in cell styles on the Home tab.

You can choose which styles you think are appropriate and which are not. Personally, I use Title and Heading 4 all the time. The other styles seem arbitrary. Why should calculated cells have an orange font? It makes no sense to me. In the figure below, cell A1 has a Title style. Row 3 and column A uses the Head- ing 4 style. Column F and Row 6 use the Calculation style.

Figure 1241 Some styles look good. Others do not.

ADD YOUR OWN STYLES
Problem: Most of my worksheets deal with positive numbers. Thus, I prefer to use a number format of
“#,##0” instead of the accounting format. When I use the Comma style, Excel uses the accounting format.
This format allows for the possibility of negative numbers in parentheses, and therefore all the positive numbers are not quite right-aligned with the cell as shown here.
Figure 1242 The comma style uses leaves space after positive numbers.
You can add your own new style to a workbook.
First, format a cell with the correct formatting. It might be easiest to go to a blank cell that had not previously been formatted. Type a number and format that cell. To reach the full Format Cells dialog, use the Ctrl+1 shortcut key. On the Number tab, choose the Number category. Specify 0 decimal places and a thousands separator. On the Alignment tab, specify right-aligned and top-aligned.
To create a new style, select the cell with the for- matting for that style. Open the Cell Styles drop- down and choose New Style from the bottom of the menu.
Give the style a name such as CommaGood.
Because this a numeric style, you want to apply the settings from the Number and Alignment tab, but you do not want to change the existing font, color, fill, or borders. Uncheck the boxes for Font, Border,
Fill, and Protection.
Click OK to create the style. Your custom styles
now appear at the top of the Cell Styles menu. Figure 1243 Change only the number format and alignment.
When you apply the CommaGood style, you get the thousands separator without the extra space after the number.
Figure 1244 Commas but no extra space to the right of the number.
SHARE STYLES BETWEEN WORKBOOKS
Problem: I created the CommaGood style as discussed in the last topic. But, it is only in the workbook that I used. Do I really have to do this for every single workbook?
Strategy: Styles that you create are available only in the current workbook. It would be better if you could globally make the style available to all workbooks.
There are two approaches that you can use.
In the first approach, you create a sample workbook that contains all your favorite custom styles. You can copy those styles to any workbook by following these steps:
1. Open the new workbook and the sample styles workbook. 2. Make the new workbook the active workbook.
487
PART 4: MAKING THINGS LOOK GOOD

4

488

POWER EXCEL WITH MR EXCEL

 

 

3.Open the Cell Styles menu and choose Merge.

4.In the Merge Styles dialog, choose to merge from the sample styles workbook. Excel will copy the styles to the new workbook.

This approach is admittedly a hassle because you would have to apply the styles to every workbook you ever create.

An easier approach is to save your styles in Book.xltx. See "Control Settings for Every New Workbook and Worksheet" on page 25.

MOVE COLUMNS BY SORTING LEFT TO RIGHT

Problem: My IT department produces a report every day, and the columns are in the wrong sequence. It would take them two minutes to rewrite the query, but they have a six-month backlog and don’t have time to get around to it. How can I rear- range the columns?

Figure 1245 The columns are not in a logical sequence.

Strategy: Youcansortthecolumnsleft- to-right. The quick way is to add a new row with column sequence numbers. If you really have to rearrange these every day, however, it would make sense to add a custom list with the proper sequence of the columns.

Follow these steps for the quick method: 1. Insert a new row above the head-

ings.

2. In the new row, enter the numbers 1 through n to specify the desired sequence for the columns.

If you want company name first, number that column 1, and so on.

3. Select the range of data to be sort- ed. Use Ctrl+* to select the cur- rent range. If you don’t explicitly select the whole range, the Sort

command tends to remove the Figure 1246 Steps 2, 3, 6, and 7 are all shown here. numbered row 1 from the sort.

4. Select Data, Sort.

5. Click the Options button at the top of the Sort dialog.

6. Choose Sort Left to Right under Orientation. Click OK to close the Sort Options dialog. 7. In the Sort By dropdown, choose Row 1.

8. Click OK to rearrange the columns.

9. Because the column widths do not sort with the data, select Home, Format dropdown, AutoFit Col- umn Width to fix all column widths. The columns are rearranged.

10.You can now delete the temporary row 1.

Alternate Strategy: If you defined a custom list of Company, Attn:, Address, Suite, City, State, Zip, you could skip the first two steps above. When defining the sort, you would specify Company, Attn:, Address as the sequence. For information on defining a custom sort sequence, see .