Week 2 1 Entering and Editing Worksheet Data Reading
Week 2 1 Entering and Editing Worksheet Data Reading
Week 2.1.
Entering and Editing
Worksheet Data
Numeric values
Numeric values represent a quantity of some type: sales amounts, number of employees, atomic
weights, test scores, and so on. Values also can be dates (such as Feb 26, 2022) or times (such as
3:24 AM).
Text entries
Most worksheets also include text in some of the cells. Text can serve as data (for example, a list
of employee names), labels for values, headings for columns, or instructions about the
worksheet. Text is often used to clarify what the values in a worksheet mean or where the
numbers came from.
Text that begins with a number is still considered text. For example, if you type 12 Employees
into a cell, Excel considers the entry to be text rather than a numeric value. Consequently, you
can’t use this cell for numeric calculations. If you need to indicate that the number 12 refers to
employees, enter 12 into a cell and then type Employees into the cell to the right.
Formulas
Formulas are what make a spreadsheet a spreadsheet. Excel enables you to enter flexible
formulas that use the values (or even text) in cells to calculate a result. When you enter a formula
into a cell, the formula’s result appears in the cell. If you change any of the cells used by a formula,
the formula recalculates and shows the new result.
Formulas can be simple mathematical expressions, or they can use some of the powerful
functions that are built into Excel. Figure 1 shows an Excel worksheet set up to calculate a
1|P a g e
Data and Computing Skills
monthly loan payment. The worksheet contains values, text, and formulas. The cells in column A
contain text. Column B contains four values and two formulas. The formulas are in cells B6 and
B10. Column D, for reference, shows the actual contents of the cells in column B.
FIGURE 1. You can use values, text, and formulas to create useful Excel worksheets.
Error values
The fourth data type cells can hold is an error value. Error values are the results of formulas that
contain an error, like the #VALUE! error that results from trying to do addition on a text entry.
Error values are primarily used by Excel’s calculation engine so that formulas that use the results
of other formulas continue to show an error.
Entering numbers
To enter a numeric value into a cell, select the appropriate cell, type the value, and then press
Enter, Tab, or one of the arrow navigation keys. The value is displayed in the cell and appears
in the Formula bar when the cell is selected. You can include decimal points and currency
symbols when entering values, along with plus signs, minus signs, percent signs, and commas
(to separate thousands). If you precede a value with a minus sign or enclose it in parentheses,
Excel considers it to be a negative number.
Entering text
Entering text into a cell is just as easy as entering a value: activate the cell, type the text, and then
press Enter or a navigation key. A cell can contain a maximum of about 32,000 characters— more
than enough to store a typical chapter in this book. Even though a cell can hold a huge number
of characters, you’ll find that it’s not actually possible to display all of these characters.
2|P a g e
Data and Computing Skills
FIGURE 2. The Formula bar, expanded in height to show more information in the cell
What happens when you enter text that’s longer than its column’s current width? If the cells to
the immediate right are blank, Excel displays the text in its entirety, appearing to spill the entry
into adjacent cells. If an adjacent cell isn’t blank, Excel displays as much of the text as possible.
(The full text is contained in the cell; it’s just not displayed.). If you need to display a long text
string in a cell that’s adjacent to a nonblank cell, you have a few choices:
Edit your text to make it shorter.
Increase the width of the column (drag the border in the column letter display).
Use a smaller font.
Wrap the text within the cell so that it occupies more than one line. Choose Home ➪
Alignment ➪ Wrap Text to toggle wrapping on and off for the selected cell or range.
To start a new line of text or add spacing between lines or paragraphs of text in a
worksheet cell, press Alt+Enter to insert a line break.
1. Double-click the cell in which you want to insert a line break.
2. Click the location inside the selected cell where you want to break the line.
3. Press Alt+Enter to insert the line break.
3|P a g e
Data and Computing Skills
Use the Font and Font Size tools in the Font group on the Home tab of the Ribbon (or on
the Mini toolbar) to change the font or size for selected cells.
You also can use the Font tab in the Format Cells dialog box to choose fonts, as shown in
Figure 3. This tab enables you to control several other font attributes that aren’t available
elsewhere. Besides choosing the font and font size, you can change the font style (bold,
italic), underlining, color, and effects (strikethrough, superscript, or subscript). If you select
the Nor-mal Font check box, Excel displays the selections for the font defined for the Normal
style. We discuss styles later in this chapter (see “Using Named Styles for Easier
Formatting”).
FIGURE 3. The Font tab of the Format Cells dialog box gives you many additional font attribute
options.
You can choose many different font formatting options for your worksheets.
4|P a g e
Data and Computing Skills
If you prefer to keep both hands on the keyboard, you can use the following shortcut keys to
format a selected range quickly:
Ctrl+B: Bold
Ctrl+I: Italic
Ctrl+U: Underline
Ctrl+5: Strikethrough
These shortcut keys act as a toggle. For example, you can turn bold on and off by repeatedly pressing
Ctrl+B.
FIGURE 4. The full range of alignment options is available on the Alignment tab of the Format
Cells dialog box.
5|P a g e
Data and Computing Skills
Figure 5. shows examples of text that uses three types of horizontal alignment: Left, Justify, and
Distributed (with an indent).
FIGURE 5. The same text, displayed with three types of horizontal alignment
A handy formatting option is an ability to merge two or more cells. When you merge cells,
you don’t combine the contents of cells. Rather, you combine a group of cells into a single cell
that occupies the same space. The worksheet shown in Figure 6 contains four sets of merged
cells. Range C2:I2 has been merged into a single cell and so have ranges J2:P2, B4:B8, and B9:B13.
In the latter two cases, the text orientation has also been changed.
FIGURE 6. Merge worksheet cells to make them act as if they were a single cell.
You can merge any number of cells occupying any number of rows and columns. In fact, you can
merge all 17 billion cells in a worksheet into a single cell—although there probably isn’t a good
reason to do so, except maybe to play a trick on a co-worker.
6|P a g e
Data and Computing Skills
The range that you intend to merge should be empty, except for the upper-left cell. If any of the
other cells that you intend to merge are not empty, Excel displays a warning. If you continue,
all the data (except in the upper-left cell) will be deleted.
You can use the Alignment tab of the Format Cells dialog box to merge cells, but using the Merge
& Center control in the Alignment group on the Ribbon (or on the Mini toolbar) is simpler. To
merge cells, select the cells that you want to merge and then click the Merge & Center button.
The cells will be merged, and the content in the upper-left cells will be centered horizontally.
The Merge & Center button acts as a toggle. To unmerge cells, select the merged cells and click
the Merge & Center button again.
After you merge cells, you can change the alignment to something other than Center by using
the controls in the Home ➪ Alignment group.
The Home ➪ Alignment ➪ Merge & Center control contains a drop-down list with these
additional options:
Merge Across When a multirow range is selected, this command creates multiple
merged cells—one for each row.
Merge Cells Merges the selected cells without applying the Center attribute.
Unmerge Cells Unmerges the selected cells.
Values that you enter into cells normally are unformatted. In other words, they simply consist
of a string of numerals. Typically, you want to format the numbers so that they’re easier to read
or are more consistent in terms of the number of decimal places shown.
Figure 7 shows a worksheet that has two columns of values. The first column consists of
unformatted values. The cells in the second column are formatted to make the values easier to
read. The third column describes the type of formatting applied.
FIGURE 7. Use numeric formatting to make it easier to understand what the values in the
worksheet represent.
7|P a g e
Data and Computing Skills
Excel is able to perform some formatting for you automatically. For example, if you enter 12.2%
into a cell, Excel knows that you want to use a percentage format and applies it for you
automatically. If you use commas to separate thousands (such as 123,456), Excel applies comma
formatting for you. And if you precede your value with a dollar sign, the cell is formatted for
currency (assuming that the dollar sign is your system currency symbol).
Anything you enter that can possibly be construed as a date will be treated as such. And
depending on how you enter it, Excel will choose a date format to match. If you enter 1/31/2022,
Excel will interpret that as a date and format the cell as 1/31/2022 (just as it was entered). If
you enter Jan 31, 2022, Excel will format it as 31--Jan--22 (if you omit the comma, Excel won’t
recognize it as a date). The less obvious example of entering 1-31 causes Excel to display 31--Jan.
If you need to enter 1-31 in a cell and it’s not supposed to be a date, type an apostrophe (‘) first.
FIGURE 8. When you need more control over number formats, use the Number tab of the Format
Cells dialog box.
The following are the number format categories, along with some general comments:
❖ General The default format; it displays numbers as integers, as decimals, or in scientific
notation if the value is too wide to fit in the cell.
8|P a g e
Data and Computing Skills
❖ Number Enables you to specify the number of decimal places, whether to use a comma
to separate thousands, and how to display negative numbers (with a minus sign, in red,
in parentheses, or in red and in parentheses).
❖ Currency Enables you to specify the number of decimal places, choose a currency
symbol, and specify how to display negative numbers (with a minus sign, in red, in
parentheses, or in red and in parentheses). This format always uses a comma to separate
thousands.
❖ Accounting Differs from the Currency format in that the currency symbols always align
vertically at the left edge of the cell.
❖ Date Enables you to choose from several different date formats.
❖ Time Enables you to choose from several different time formats.
❖ Percentage Enables you to choose the number of decimal places and always displays
a percent sign.
❖ Fraction Enables you to choose from among nine fraction formats.
❖ Scientific Displays numbers in exponential notation (with an E): 2.00E+05 = 200,000;
❖ 2.05E+05 = 205,000. You can choose the number of decimal places to display to the left
of E. The second example can be read as “2.05 times 10 to the fifth.”
❖ Text When applied to a value, causes Excel to treat the value as text (even if it looks like
a number). This feature is useful for such items as part numbers and credit card
numbers.
❖ Special Contains additional number formats. In the U.S. version of Excel, the additional
number formats are ZIP Code, ZIP Code +4, Phone Number, and Social Security Number.
❖ Custom Enables you to define custom number formats that aren’t included in any other
category.
9|P a g e
Data and Computing Skills
❖ Top/Bottom Rules Examples include highlighting the top 10 items, the items
in the bottom 20 percent, and the items that are above average.
❖ Data Bars Applies graphic bars directly in the cells, proportional to the cell’s
value.
❖ Color Scales Applies background color, proportional to the cell’s value.
❖ Icon Sets Displays icons directly in the cells. The icons depend on the cell’s
value.
❖ New Rule Enables you to specify other conditional formatting rules, including
rules based on a logical formula.
❖ Clear Rules Deletes all the conditional formatting rules from the selected
cells.
❖ Manage Rules Displays the Conditional Formatting Rules Manager dialog box
in which you create new conditional formatting rules, edit rules, or delete rules.
10 | P a g e
Data and Computing Skills
The example on the right shows the same data, but conditional formatting was applied to each
region separately. This approach facilitates comparisons within a region and can identify high
or low sales months. Neither one of these approaches is necessarily better. The way you set up
conditional formatting depends entirely on what you’re trying to visualize.
Windows: F4
Mac: Cmd + T
When writing formulas, any portion of the formula that denotes a cell or range of cells can be
made absolute by hitting the F4 key while your cursor is on that cell reference. This means
you can use F4 to add $ dollar symbols in front of the column letters and row numbers, $A$12.
By continuing to hit the F4 key, you can toggle or cycle through mixed references (column
absolute while row relative, or row absolute while column relative), and then back again to a
completely relative reference.
! TASK
By using Toggle Absolut References try to create the 10x10
multiplication table.
11 | P a g e