OFFICE AUTOMATION – I WORD - BASICS 23. TABLES This lesson familiarizes you with the Table feature of Microsoft Word. This will help you to create tables and work with tables in MS Word.
23.0 Objectives On completion of this lesson you will be able to: • • •
Get familiar with how to create a table in a document. Use the options available for modifying the format of the table. Create a simple table in any word document.
23.1 Introduction In the previous lessons you have learnt the formatting options available for text in the document. This lesson deals with creating a table and different options/format for tables in MS Word.
23.2 Creating a Table • •
To create a four-column, five-row table: Click on “Table”, which is located on the Menu bar.
• •
Click on “Insert” option and click on “Table” option. Type 4 in the Number of “Columns” field. 1
• •
•
Type 5 in the Number of “Rows” field. Select “Auto” in the Column Width field. Selecting Auto allows Microsoft Word to determine the size of your column widths. Alternatively, you can enter the column width you desire. Click on “OK”.
Your table should look like the one shown in the picture above, with four columns and five rows. 23.2.1 Creating a Table Using the Insert Table Icon You can also create a table by clicking on the “Insert” Table icon on the Standard toolbar. Click on the Insert Table icon.
Note: The Insert Table icon does not display on the toolbar if your cursor is located on a table. If you can not find the Insert table icon, move your cursor outside of the table. Highlight the number of rows and columns you need. Click again to create the table. The maximum table size is a four-row by five-column table. Click or press “Enter” to create the table.
2
23.2.2 Moving Around a Table You refer to each block in a table as a cell. Use the “Tab” key to move between cells from left to right. Use “Shift-Tab” to move between cells from right to left. The following exercise demonstrates this: • • •
Click in the first cell in the first column. Press the “Tab” key nine times. The cursor moves forward nine cells. Press “Shift-Tab” six times. The cursor moves backward six cells. Note: You can also move to a cell by clicking in the cell. In addition, you can move around the table by using the left, right, up, and down arrow keys.
23.3 Entering Text into a Table To enter text into a table, simply type as you normally would. Press “Tab” to move to the next cell. Enter the text shown below into your table. • • •
Type the heading “Salesperson” in first cell of first column and press the “Tab” key. Type the heading “Dolls” in first cell of the second column and press the “Tab” key. Continue entering, until you have entered all of the text.
23.3.1 Selecting a Row and Bolding the Text In this exercise, you will select the first row of the table and bold all of the text on the row. 3
• • • •
Click anywhere on the first row of your table. Click on “Table” menu, click on “Select” option and then click on “Row” option. MS Word should select the first row of the table. Press “Ctrl-B” to bold the text of the row.
23.3.2 Right-Aligning Text In this exercise, you will right-align the second (Dolls), third (Trucks), and fourth (Puzzles) columns of the table you created. •
• • •
You need to highlight "Dolls," "Trucks," and "Puzzles” Place the cursor before the "D" in "Dolls." Press and hold the “Shift” key and then press the right arrow key until you have highlighted "Dolls", "Trucks" and "Puzzles". Click on “Table” menu and click on “Select” option and click on “Column”. Microsoft Word should select the Dolls, Trucks, and Puzzles columns. Press “Ctrl-R” to right-align the cells. Your table should look like the one shown here. Make any needed corrections before continuing.
Note: All of the formatting options you learned about in previous lessons can be applied to cells in a table.
23.4 Operations on Rows and Columns 23.4.1 Adding a New Column to a Table You can add new columns to your table; MS Word adds new columns to the left or right of your current location. To add a new column between the Salesperson and Dolls columns: • •
Place the cursor anywhere in the Dolls column. Click on the “Table” menu, and click on “Select” option and then click on “Column”. Microsoft Word should select the dolls column.
4
• •
Click on Table, and click on Insert and then select Columns to the Left. Microsoft Word should create a new column to the left of Dolls columns. Note: You can also select the Column to the right if you want to add a column to the right of the highlighted cell/column.
•
Label the new column as Region and add the text shown in the table below.
23.4.2 Resizing the Columns You can easily change the size of your column widths. In this exercise, you will first select the entire table and then you will adjust all the column widths. • • • •
•
•
Click on the column you want to resize in your table. Click on “Table” menu, and click on the “Select” option then click on the “Column” option. You will see your column selected. Again click on “Table” menu, and click on the “Table Properties” option, “Table Properties” dialog box appears on the screen. Click on the “Column” tab, if it is not in the front.
Type 1 in the Width of Columns 1-4 field. This will cause Microsoft Word to set all the columns to a width of one inch. Click on “OK”.
5
•
Depending on your font, the first column of your table might not be wide enough and the text might be wrapping. Note: If you want to change the width of other columns also you can click on “Previous Column” or “Next Column” buttons. To widen the first column:
• • •
Place the cursor anywhere in the first column. Click on “Table”, click on “Select” and then click on “Column”. Click on “Table Properties” from “Table” menu. Click on the “Column” Tab, Type 1.5 in field 1 and click on “OK”.
23.4.3 Resizing Your Column Widths by Using the Width Indicator You can resize your column width by placing the cursor on the line that separates two columns. This will cause the width indicator to appear. After the width indicator appears left-click and drag with the mouse to adjust the column width.
23.4.4 Adding a New Row to the End of the Table You can add additional rows to your table. The simplest way to add a new row is to move to the last column of the last row and press the “Tab” key. You can then type any additional text you need to add.
Move to the last column of the last row of your table. Press the “Tab” key. 23.4.5 Adding a Row within the Table You can add a new row anywhere in the table. MS Word adds new rows above or below your current row. The exercise that follows demonstrates this.
• • •
To add a row just above York, George: Place the cursor anywhere in the fourth row (the row with York, George as the salesperson). Click on “Table” menu, click on the “Insert” option and click on the “Row above” option. MS Word should insert a new row above the York, George row. 6
•
Add the information shown here to the new row.
Self Check Questions Answer True or False 1. Insert Table icon is available on Formatting Toolbar. (T/F) 2. Tab key is used to move in backward direction in a table. (T/F) Fill in the blanks 3. While entering data in the table, when you press tab you move to …………………….. Cell. 4. Alt +……+……+….. is the shortcut command for deleting a row from the table? 5. Alt +……+……+….. is the shortcut command for inserting a column to the left in a table? 6. To add a row above the current row you select …………….. Option from Insert option.
23.5 Sorting a Table With MS Word, it is easy to sort the data in your table. You could perform multi sorting like sort your table data by Region and within Region by Salesperson in ascending order.
• •
Click anywhere on your table. Click on Table menu, click on Sort option.
7
• • • • • • • • •
Select Region in the Sort By field. Select Text in the Type field (because you are sorting text). Select Ascending. Select Salesperson in the Then by field. Select Text in the Type field (because you are sorting text). Select Ascending. Select Header Row (because your table has titles across the top of the table). Click on OK. MS Word should have sorted your table like the one shown here:
23.6 The Sum Function You can perform a limited number of calculations on the numbers in your table of MS Word. Several functions are available to you. The exercise that follows, demonstrates the “Sum” function. In this exercise, you will add a new row to your table, type the word "Total" at the bottom of the Salesperson column, and sum the Dolls, Trucks, and Puzzles columns. • • • • • • • • • • • • • • • • • •
Place your cursor in the cell located on the last row in the last column. Press the “Tab” key to insert a new row. Type “Total” in the cell on the bottom row in the Salesperson column. Press “Tab” key to move to the Dolls column. Click on the “Table” menu, click on the “Formula” option. Type “=SUM (ABOVE)” in the formula field, if it does not automatically appear. Select #,##0 in the Number Format field. This selection will cause MS Word to separate thousands with a comma. Click on “OK”. Move to the Trucks column. Click on the “Table” menu, and click on the “Formula” option. Type “=SUM (ABOVE)” in the formula field. Select ”#,##0”in the Number Format field. Click on “OK”. Move to the Puzzles column. Click on the “Table” menu, click on the “Formula” option. Type “=SUM (ABOVE)” in the formula field. Select “#,##0” in the Number Format field. Click on “OK”.
8
23.6.1 Deleting a Column You can delete columns from your table. • • • • • •
To delete the Trucks column Place your cursor anywhere in the Trucks column. Click on the “Table” menu, click on the “Select” option and click on the “Column” option. MS Word will select the entire column. Click on “Table” menu, click on “Delete” option and then click on the “Column” option. You will notice that the highlighted column is deleted.
23.6.2 Deleting a Row You can delete rows from your table. • • • • • •
To delete the York, George row: Place your cursor anywhere in the York, George row. Click on “Table” menu, click on the “Select” option and then click on the “Row” option. MS Word will select the entire row. Again click on “Table” menu, click on the “Delete” option and then click on the “Row” option. You will notice that the highlighted row is deleted.
23.6.3 Recalculate Unlike a spreadsheet, MS Word does not automatically recalculate every time you make a change to the table. •
• • •
To cause a function to recalculate, you must first move to the cell that contains the function and then right-click, and select “Update Field” option from the “context” menu. Because you deleted a row in the previous exercise, your calculations are now incorrect To recalculate: Move to the Dolls/Total cell, and right click and click on “Update field”. You will notice that the values have been recalculated and changed in the cells.
23.7 Merge Cells Using MS Word, you can merge cells: turn two or more cells into one cell. •
In this exercise, you are going to create a new row at the top of your table, merge the cells, and add a title to the table.
9
• • • • • •
Move to the cell located on the first row of the first column of your table (the Salesperson cell). Click on the “Table” menu, click on “Insert” option and click on the “Row” Above” option. MS Word should insert a new row above your row of headings. Highlight the row and click on the “Table” menu. Click on the “Merge Cells” option. Type Toy Sales in the new cell. Press “Ctrl + E” to center align the title.
23.7.1 Table Headings If MS Word splits your table with a page break, the table heading will display on the first page but not on subsequent pages. To correct this problem, you can designate rows as headings. Heading rows are repeated on the top of your table at the top of each page. To designate a row as a heading: • • •
Place your cursor on the row. Click on the “Table” menu click on the option “Heading Rows Repeat”. You will notice that the heading row has been added as the first row of the table of each page.
23.8 Converting Text to a Table You can convert text to a table; however, a delimiter such as a comma, paragraph marker, or tab must separate columns of text. • •
In the exercise that follows, you will convert comma-delimited text into a table. Type the following as shown (do not bold). Color, Style, Item Blue, A980, Van Red, X023, Car Green, YL724, Truck Name, Age, Sex Bob, 23, M
• • • • • • •
Highlight the text. Click on the “Table” menu click on the “Convert” option and click on the “Text to Table” option. Type 3 in the Number of Columns field. Select “Auto” in the “Column Width” field. Select the “Comma” radio button in the “Separate text at” frame. Click on “OK”. MS Word should have converted your text into a table and your table should look like the one shown here.
10
23.9 Splitting Cells In case you have created a table and then you need to add another row or a column to the table, or need to split a cell into two rows or columns. MS Word provides an option that lets you do that easily.
• • •
To Split the Cells Right Click in the cell that you want to split. Click on the option “Split Cells” from the “Table” menu. “Split Cells” dialog box appears. Enter the number or columns or rows and click on “OK”. The cell will be split according to the option chosen.
23.10 Table AutoFormat You can use AutoFormats to easily apply borders, shading, special fonts, and color to your table. MS Word lists all Formats in the “Table AutoFormat” dialog box. While in the “Table AutoFormat” dialog box, click on a format to see how it displays the table in the “Preview” box. You can choose the format to be applied to your table. Check the features you want to apply in the “Table styles” options and “Apply special formats to” frames. MS Word comes with a long list of AutoFormats. To apply an AutoFormat to your Name, Age, and Sex table: • • • • • •
Click anywhere in the table. Click on the “Table” menu, and click on “Table AutoFormat”. From the “Table Style” list, click on the style for your table. Select “Heading Rows” and “First Column” in the “Apply special formats to” frame. Do not select “Last Row” and “Last Column”. Click on “OK”. Your table should look like the one shown here.
11
Self Check Questions Answer True or False 7. Merge cells option joins two cells together and makes one. (T/F) 8. Table Auto format option is used to format the table. (T/F) Fill in the blanks 9. From Table menu ……………………………………… option is used to format the table. 10. To sort the numbers in the table in the pattern of 1 to 10 you will select ………………. Option as a Type of Sort from the dialog box 11. ……………………….. is the formula you use to get total of numbers in a table. 12. Click on the option …………………… from the Table menu to split cells. Objective Type Group 1 13. Table Insert Column 14. Table Delete Row 15. Table Auto format
Group 2 a. Used to delete a row b. Used to format a Table c. Used to insert a column
23.11 Summing Up In this lesson you have familiarized yourself with the following: • • • • • • • • •
Creating a Table & Moving Around a Table Entering Text & formatting Operations on Row and Column Sorting a Table Sum function and Recalculate Merge Cells and Table headings Converting Text to a Table Splitting cells Table AutoFormat
12
23.12 Answers to Self Check Questions 1. F 2. F 3. Next 4. Alt + A + D + R 5. Alt + A + I + L 6. Row Above. 7. T 8. T 9. AutoFormat 10. Ascending 11. =SUM(Above) 12. Split cells. 13. C 14. A 15. B
23.13 Terminal Questions 1. 2. 3. 4.
How do create a table and enter text into it? How do you move around a table? What kind of operations can be carried out on columns of the tables? How would you merge two Cells in a table?
23.14 Glossary •
• •
Width Indicator: You can resize the column width by placing the cursor on the line that separates two columns. This will cause the width indicator to appear. After the width indicator appears left-click and drag with the mouse to adjust the column width Merge Cells: This combines two or more cells into one Split Cells: This divides a cell into the specified no. of cells
13