- Select cells from A4 to D16 and press Ctrl + C.
- Click cell F4 and press Ctrl + V.
- Click cell B7 and type Alcohol-in-combination press Enter.
- In cell B8, type Cocaine and press Enter.
- In cell B9, type Heroine/Morphine and press Enter.
- In cell B10, type Acetaminophen and press Enter.
- In cell B11, type Marijuana/Hashish and Enter.
- In cell B12, type Aspirin
- In cell B13, type Alprazolam (Xanox)
- In cell B14, type Ibuprofen
- In cell B15, type Diazepam (Valium)
- In cell B16, type Amitriptyline and press Enter
- In cell B17, type m and press Enter (typing M should auto-complete the cell with Marijuana/Hashish).
- Click cell B8. On the main menu, click Edit -> Copy.
- Click cell G7. On the main menu, click Edit -> Paste.
- Click cell B7. On the Function bar, click the Copy button .
- Click cell G8. On the Function bar, click the Paste button .
- Click cell B9 to give it focus.
- Press and hold Shift. Then click cell B9 again and release Shift.
- Press Alt. Position your mouse on the lower border of the selected cell (cell B9). Click and drag in the right direction until you get to cell G9 (a small box displaying
on the mouse pointer will guide you):
- Then release the mouse and the Alt key. Notice that the cells
content has been copied
- Click cell G10 and type Codeine
- Click cell B15 to select it. Right-click cell B15 and click Copy.
- Click cell G11 to select it. Right-click cell G11 and click Paste.
- Click cell G12 and type Methadone
- Click cell B16 to make it active. Right-click cell B16 and click Copy.
- Click cell G13 and press Ctrl + V
- Click cell G16 and press Ctrl + V.
- Click cell G14 and type D-propoxyphene
- Click cell B17 to give it focus.
- Press and hold Shift. Then click cell B17 again
- Position your mouse on the left border of the selected cell (cell B17).
Click and drag to the right and up direction until you get to cell G15 (a small box displaying
on the mouse pointer will guide you). Then release the mouse. That will move the content of B17 to G15.
- Double-click cell G16, press Home, press Delete three times, and type Nor and press Enter. That will change the content of G16 from
Amitriptyline to Nortriptyline
- To save the workbook, on the main menu, click File -> Save.
- Now we will enter the right statistical values in the table. We will enter one value in one cell and use it to pre-configure all the others.
In cell C7, type 141773 and press Enter
- Now we will use the content of cell C7 to format the other cells.
Select cells C7:D16.
- Press and hold Ctrl, then select cells H7:I16. Release Ctrl.
- Right-click in the selection and click Format Cells...
- In the Cell Attributes dialog box, click the Numbers property sheet.
In the Category list box, make sure Number is selected.
- In the Options section, click the Thousands Separator check box
- Click OK.
- Click cell C8 and type 119843 and press Enter. Notice that the number has been formatted automatically.
- In cell H7, type 3465, press the down arrow key, type 2944 and press Enter.
- Now we will review how to "Clear cell formats".
In cell D7, type 3270. In cell I7, type 4600 and press Enter. The numbers display as 3,270 and 4,600 respectively. That's not the way we want our numbers displayed. The numbers in columns D and I represent percentage values; so, instead of 3,270 and 4,600, we need to have 32.70% and 46.00% respectively.
Click cell D7 to select it.
- Right-click cell D7 and click Format Cells...
- In the Cell Attributes dialog box, click the Numbers property sheet
if necessary. To clear the format, in the Format list box, click General and click OK. Now the number displays as a normal number. What a high percentage!
- To configure cell D7 as holding a percentage number, while cell D7 is still selected, click the
Number Format:Percent button
on the Object bar. Now, it is still (very) bad.
- To reset the number in cell D7, on the Standard toolbar, click Undo (or press Ctrl + Z)
- Since the column headers in cells D4:D6 and I4:I6 are explicitly saying that their values represent percentage numbers, we don't need to display the % sign in their children cells, just the values but formatted as percentage numbers. That's a very good reason to create our own format values.
Select cells D7:D16 and cells I7:I16 altogether.
- Right-click in the selection and click Format Cells.
- You should be in the Numbers property sheet. In the Category list, click
- In the Format Code text box, type ##\.#0
- Click OK.
- In cell C9, type 31355 and press the down arrow key. Type 23997 and
press the down arrow key. Type 18834, down. Type 16498, down. Type 16400, down. Type 13947, down. Type 10132, press the right arrow key.
- In cell D16, type 234 and press the up arrow key. Type 322, press the up arrow key. Type 378, up. Type 381, up. Type 434, up. Type 554, up. Type 723, up. Type 1107, up. Type
2765 and press Enter.
- Notice how each number is automatically formatted to suit our need.
Complete the worksheet as follows:
- Notice that, in column H, the numbers that have less than three digits don't display a comma sign.
- Also notice that, unlike the traditional percentage values that ignore the most right zero on a number, our format displays 46.00 (with two zero decimal values) and 8.50 and 5.50 display their right zeros, in column I.
- Save the workbook.