0% found this document useful (0 votes)
36 views

Excel User Tips - Formatting

This document provides tips for formatting cell comments and tooltips in Excel. It explains that the default formatting of cell comments can be changed by modifying the formatting of Windows tooltips. This involves accessing the Display Settings dialog box from the Windows Control Panel and modifying properties like font, size, and colors. It notes that changing the default formatting will affect all existing and future comments unless individual comments have already been specifically formatted.

Uploaded by

Leon Fourone
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Excel User Tips - Formatting

This document provides tips for formatting cell comments and tooltips in Excel. It explains that the default formatting of cell comments can be changed by modifying the formatting of Windows tooltips. This involves accessing the Display Settings dialog box from the Windows Control Panel and modifying properties like font, size, and colors. It notes that changing the default formatting will affect all existing and future comments unless individual comments have already been specifically formatted.

Uploaded by

Leon Fourone
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Excel User Tips

Changing the Default Cell Comment Formatting


Excel's Insert - Comment command lets you annotate a cell by typing a comment. Once
the comment is created, you can change its formatting. To do this, right-click the cell
and select Edit Comment from the shortcut menu. When the comment is displayed, click
anywhere on its border to select the entire comment object. Now you can use the
standard toolbar buttons to change the font, text size, or colors.

To change the default formatting of your cell comments (so you don't have to repeat
that process each time), you need to go outside Excel and use the Windows Display
Settings dialog box. Excel uses the formatting specified for Windows' ToolTips (the text
that appear when your pointer hovers near toolbar buttons).

You can access the Display Settings dialog box from the Control Panel. Or, you can
right-click the desktop and choose Properties. Access the Appearance tab of the Display
Properties dialog box, and select the ToolTip item. You can then modify the font, the
font size, the background color, the foreground color, and the Bold and Italic attributes.

NOTE:
If you're using Windows XP, you need to click the Advanced button in the Appearance
tab of the Display Properties dialog box. This brings up the Advanced Appearance dialog
box, where you can make the change.

Be aware that this will affect all comments that have not been formatting. If you've
already applied formatting to a comment (for example, changed the background color),
that comment will not be affected by this change.

Excel User Tips_Formatting


Page 1 of 11
Display text in multiple lines
Q. How can I make text in a cell display in multiple lines?

When entering text into the cell, press Alt-Enter to insert a line break.

When you do so, Excel will automatically apply text wrapping to the cell. To reformat
existing cells so they sport wrapped text, select the cells and then choose Format, Cells.
On the Alignment tab, select "Wrap text," and click OK.

Fix incorrect decimal places during data entry


Q. When I enter a value, it appears with two decimal places. For example,
when I enter 154 it shows up as 1.54. What's wrong?

Somehow Excel's fixed-decimal mode was turned on. To return to normal, select Tools,
Options to display the Options dialog box. Then click the Edit tab and remove the
checkmark from the "Fixed decimal" option.

Of course, this feature can be useful when entering some types of data, but most of the
time, you'll want to keep the fixed-decimal mode turned off.

Using conditional formatting


Excel's conditional formatting feature (available in Excel 97 or later) offers an easy way
to apply special formatting to cells if a particular condition is met. This feature is even
more useful when you understand how to use a formula in your conditional formatting
specification.

The worksheet below shows student grades on two tests. Conditional formatting
highlights students who scored higher on the second test. This formatting is dynamic; if
you change the test scores, the formatting adjusts automatically.

To apply conditional formatting, select range A2:C15 and choose Format, Conditional
Formatting. The Conditional Formatting dialog box will appear with two input boxes. In
the first box, choose Formula Is, press Tab, and enter the following formula:
=$C2>$B2

Excel User Tips_Formatting


Page 2 of 11
Click Format and choose a format to distinguish the cells (the example uses background
shading). Click OK, and the formatting will be applied.

The conditional formatting formula is evaluated for each cell in the range. The trick here
is to use mixed cell references (the column references are absolute, but the row
references are relative). To see how this works, activate any cell within the range and
choose Format, Conditional Formatting so you can examine the conditional formatting
formula for that cell. You'll find that cell A7, for example, uses this formula:
=$C7>$B7.

Working with fractions


Some types of data, such as stock market quotes, normally display as fractions, not
decimals. To enter a fraction in Excel, type the whole number (or integer) followed by a
space, and then type the fraction, using a slash (for example, 5/8). If you type only a
fraction, Excel may interpret it as a date (so it might read 5/8 as May 8). To avoid this
mistranslation, enter 0, a space, and then the fraction.

When you enter a fractional value, Excel automatically applies a fraction number format
that reduces it to the smallest possible denominator. For example, if you enter 16 2/8,
Excel displays the number as 16 1/4. In some cases, however, you'll want the fractions
to use a common denominator. For example, you might want the value 16 2/8 to be
shown as 16 4/16. To obtain this result, select your cells and choose Format, Cells.
Then select the Number tab and choose Fraction from the Category list. Finally, select
the desired number format from the Type list.

The worksheet below shows some examples of numbers expressed as fractions. Column
B shows the numbers produced using Excel's default formatting. Column C has the
same values formatted as 16ths.

You can also express fractional data using a decimal point. For instance, the number 9
4/16 could appear as 9.04. Here, the digits to the right of the decimal represent 16ths.
To display values in this format, use Excel's DOLLARFR() function. It's available only
when the Analysis ToolPak is installed (select Tools, Add-ins to install it). The
DOLLARFR() function takes two arguments: the number and an integer for the
denominator. The formula =DOLLARFR(9.25,16), for example, returns 9.04.

Excel User Tips_Formatting


Page 3 of 11
This function is also useful for nondollar data. So, if you work with feet and inches, you
can represent 11.5 feet as 11.06 (11 feet, 6 inches) by using this formula:
=DOLLARFR(11.5,12).
The value will then appear as "11 [feet] 6 [inches]."

The DOLLARFR() function is for display only. You can't use the value it returns in other
calculations or in charts. To perform calculations on such values, reconvert them into
decimal values by using the DOLLARDE() function (also part of the Analysis ToolPak).

Avoid error displays in formulas


Sometimes a formula may return an error message. Usually, you'll want to know when
a formula error occurs. But now and then you may prefer to avoid the messages. You
can do so by using an IF() function to check for an error.

For example, the formula below displays a blank if the division results in an error.
=IF(ISERROR(A1/B1),"",A1/B1)
You can adapt this technique to any operation. The original formula serves as the
argument for the ISERROR() function, and it repeats as the last argument of the IF()
function. Like this:
=IF(ISERROR(OriginalFormula),"",OriginalFormula)

Format cells to display in thousands


Q. Is there a way to display thousands without zeros? For example, I would
like 52,000 to appear as 52.

First, select the cells to be formatted, then choose Format, Cells. Click the Number tab.
Select Custom from the Category list, and in the Type box enter 0, (that's a zero
followed by a comma).

When this number format is applied, the cells will retain the correct numerical values,
but they will be displayed without the last three digits.

To display values in millions, insert an additional comma at the end of the format string
(0,,).

Another possibility is to display one or more decimal places--for example, 52,100 as


52.1. To do this, include a decimal point in your format string (0.0,).

You can also use these number formats in charts. To do so, double-click the chart axis
to display the Format Axis dialog box. Then click the Number tab and specify the desired
format. In Excel 2000 and later, the Scale tab of the Format Axis dialog box lets you
specify the unit scaling directly. Just choose Millions from the "Display units" drop-down
box.

Change the formatting of your subtotal rows


Excel's Data, Subtotals command inserts subtotal formulas into a list. This is a very
useful command, but it's often difficult to identify the subtotal rows.

You may want to make the subtotal rows stand out by applying special formatting.
However, this can't be done by any of Excel's autoformats. Use the outline controls on
the left side of the workbook to collapse the outline so only the subtotal rows are
visible. Press F5, select Visible Cells Only, and click OK. Then apply formatting to the
selected cells.

When you expand the outline, only the subtotal rows will have the formatting you
applied.

Excel User Tips_Formatting


Page 4 of 11
Displaying a value in an AutoShape
You want to make a particular value really stand out? Use an AutoShape.

First, click the AutoShapes button on the Drawing toolbar, select the shape you want to
use by clicking it, and click in the formula bar. Then enter a cell reference such as the
following:
=$B$14
Press Enter. In the example below, the contents of cell B14 will then be displayed inside
the AutoShape. If the content of the referenced cell changes, the graphic will reflect the
change. The advantage is that AutoShapes offer formatting options that are not
available within the standard Format menus.

To make an AutoShape even snazzier, double-click the graphic to access the Format
AutoShape dialog box. From there, you can apply formatting changes -- for instance,
adjusting the vertical or horizontal positioning, changing the font, adding color, or
making the text bold.

Removing or avoiding automatic hyperlinks


You may have discovered that Excel 2000 supports automatic cell hyperlinks. Whenever
you type something that resembles a URL or an e-mail address into a cell, this feature
automatically converts the text into a clickable hyperlink. But what if you don't want to
create a hyperlink?

If you use Excel 2000, you're out of luck. There is no way to turn this potentially
annoying feature off. But you can, however, override it. If Excel creates a hyperlink
from your cell entry, click the Undo button (or press Ctrl-Z) to restore the cell's contents
to normal text. Or, you can precede the cell entry with an apostrophe.

Note: If you're using Excel 2002, you can turn automatic hyperlinks on or off in the
AutoCorrect dialog box

Surprisingly, Excel doesn't provide a direct way to remove all hyperlinks on a


worksheet. In fact, the only way to accomplish this is one cell at a time: Activate the
cell that contains the hyperlink, right-click, and then select Hyperlink, Remove
Hyperlink. Unfortunately, this command is available only when you have selected a
single cell. To quickly deactivate all hyperlinks, you need to use a macro.

To create the macro, press Alt-F11 to activate the Visual Basic Editor, select Insert,
Module to insert a new VBA module into your project, and then enter the following
code:
Sub ZapHyperlinks()
Cells.Hyperlinks.Delete

Excel User Tips_Formatting


Page 5 of 11
End Sub
When you execute the ZapHyperlinks macro, all hyperlinks on the active sheet are
deleted and replaced with normal text.

Automatic list numbering


It's fairly easy to create a formula that generates consecutively number items in
nonconsecutive cells. Refer to the figure below.

Column A consists of formulas that refer to column B. The formula in cell A1 is:
=IF(B1<>"",COUNTA($B$1:B1)&".","")
This formula, which is copied down to the other cells in column A, displays the next
consecutive item number if the corresponding cell in column B is not empty. If the cell
in column B is empty, the formula displays nothing.

As items are added or deleted from column B, the numbering updates automatically.

Text and values in one cell


Did you know that you could combine text and values in a single cell?

For example, assume cell A12 contains the value 1435. Enter the following formula into
another cell:
="Total: "&A12
The formula cell will display: "Total: 1435."

The ampersand is a concatenation operator that joins the text with the contents of cell
A12.

Applying a number format to the cell containing the formula has no effect, because the
cell contains text, not a value. As a work-around, modify the formula to use the TEXT
function (the second argument for the TEXT function consists of a standard Excel
number-format string).
="Total: "&TEXT(A12,"$#,##0.00")

Excel User Tips_Formatting


Page 6 of 11
This formula will display "Total: $1,435.00."

Here's another example formula that uses the NOW function to display some text along
with the current date and time:
="Report printed on "&TEXT(NOW(),"mmmm d, yyyy at h:mm AM/PM")

Creating a linked picture of a range


Many users overlook a useful Excel feature that can create a live "snapshot" of a range
and placing it anywhere you like.

To use this feature:

1. Select a range of cells

2. Choose Edit, Copy

3. Hold down the Shift key, and then choose Edit, Paste Picture Link.

The result is an image of the selected range that will reflect any subsequent changes to
the source.

This technique is great for printing noncontiguous ranges on a single page. After
creating a series of linked pictures of ranges, set them to print on one page.

Note: The Paste Picture Link command is a hidden command, and it appears on the Edit
menu only if you press the Shift key.

Duplicate repeated entries in a list


You've probably seen an Excel worksheet (like the sheet on the left, below) in which one
entry in column A applies to several rows of data. Sort such a list and you get a real
mess, because rows with empty cells in the sort column move to the top or bottom
(depending on the sort order).

Excel User Tips_Formatting


Page 7 of 11
When a list is small, you can enter the missing cell values manually. But if your
database is huge, you need a better way of filling in those cell values. Here's how:

1. Select the range (A3:A14 in the example above)


2. Press Ctrl-G to get the Go To dialog box.
3. In the Go To dialog box, click Special.
4. Select the Blanks option.
5. Type = followed by the address of the first cell with an entry in the column (=A3
in the example above), and press Ctrl-Enter.
6. Reselect the range and choose Edit, Copy.
7. Then select Edit, Paste Special, choose the Values option, and click OK.
The missing entries will be filled in, as in the sheet on the right in the above figure.

Alternate row shading using Conditional Formatting


One way to make your data legible is to apply cell shading to every other row in a
range. Excel's Conditional Formatting feature (available in Excel or later) makes this a
simple task.

1. Select the range that you want to format

2. Choose Format, Conditional Formatting

3. In the Conditional Formatting dialog box, select Formula Is from the drop-down
list, and enter this formula:

=MOD(ROW(),2)=0.

Excel User Tips_Formatting


Page 8 of 11
4. Click the Format button, select the Patterns tab, and specify a color for the
shaded rows.

5. Click OK twice to return to your worksheet.

The best part is that the row shading is dynamic. You'll find that the row shading
persists even if you insert or delete rows within the original range.

Identify formulas using Conditional Formatting


How many times have you accidentally deleted or overwritten cells containing formulas
only to discover the mistake after it's too late? One solution is to write-protect
important cells. Another approach is to give those cells a visual flag.

This clever technique was submitted by David Hager. It uses Conditional Formatting
(available in Excel 97 or later) to apply special formatting to cells that contain formulas-
-something that's not normally possible. With this technique you can set up your
worksheet so that all formula cells get a yellow background, for example, or so that
negative values are in boldface.

Follow these steps:

1. Select Insert, Name, Define.


2. In the Define Name dialog box, enter the following in the 'Names in workbook'
box

CellHasFormula
3. Then enter the following formula in the "Refers to" box

=GET.CELL(48,INDIRECT("rc",FALSE))
4. Click Add, and then OK.
5. Select all the cells to which you want to apply the conditional formatting.
6. Select Format, Conditional Formatting
7. In the Conditional Formatting dialog box, select Formula Is from the drop-down
list, and then enter this formula in the adjacent box (see the figure below):

=CellHasFormula
8. Click the Format button and select the type of formatting you want for the cells
that contain a formula.
9. Click OK.
After you've completed these steps, every cell that contains a formula and is within the
range you selected in Step 4 will display the formatting of your choice.

Excel User Tips_Formatting


Page 9 of 11
How does it work? The key component is creating a named formula in Steps 2 and 3.
This formula, unlike standard formulas, doesn't reside in a cell, but it still acts like a
formula by returning a value -- in this case either 'True' or 'False'. The formula uses the
GET.CELL function, which is part of the XLM macro language (VBA's predecessor) and
cannot be used directly in a worksheet. Using a value of 48 as the first argument for
GET.CELL causes the function to return 'True' if the cell contains a formula. The
INDIRECT function essentially creates a reference to each cell in the selected range.

Creating a non-graphic chart directly in a range


This tip describes how to create a non-graphic chart. It uses formulas to display crude
"bars" directly in a range of cells.

The figure below shows an example of what you can produce with his technique.

The formulas in columns E and G graphically depict monthly budget variances by


displaying a series of characters in the Wingdings font. The number of characters
displayed is determined by an IF function.

To re-create this chart in Excel, enter the data shown in columns A through D, and then
enter the following formulas:
E2: =IF(D2<0,REPT("n",-ROUND(D2*100,0)),"")
F2: =A2

Excel User Tips_Formatting


Page 10 of 11
G2: =IF(D2>0,REPT("n",-ROUND(D2*-100,0)),"")
Assign the Wingdings font to cells E2 and G2, and then copy the formulas down the
columns to accommodate all the data. Right-align the text in column E, and adjust any
other formatting as you like.

Depending on the numerical range of your data, you may need to change the scaling.
Experiment by replacing the '100' value in the formulas. You can, of course, substitute
any character you like for the "n" in the formulas to produce a different character in the
chart.

Excel User Tips_Formatting


Page 11 of 11

You might also like