Presentation is loading. Please wait.

Presentation is loading. Please wait.

Inserting and Deleting Columns, Rows, and Cells Inserting and Deleting Columns Rows and Cells, Slide 1Copyright © 2004, Jim Schwab, University of Texas.

Similar presentations


Presentation on theme: "Inserting and Deleting Columns, Rows, and Cells Inserting and Deleting Columns Rows and Cells, Slide 1Copyright © 2004, Jim Schwab, University of Texas."— Presentation transcript:

1 Inserting and Deleting Columns, Rows, and Cells Inserting and Deleting Columns Rows and Cells, Slide 1Copyright © 2004, Jim Schwab, University of Texas at Austin As we develop our Excel application, we may find that we omitted a needed cell, row, or column in a worksheet. Excel has an Insert command on both the menu bar and the popup menu for inserting cells into the worksheet. Similarly, we may find that we have included a cell, row, or column that we don't really want. Excel has an Delete command on both the menu bar and the popup menu for inserting cells into the worksheet. If we insert a row in the worksheet, Excel will move the existing rows down to accommodate the new row. When deleting a row, rows below the deleted row will move up. If we insert a column in the worksheet, Excel will move the existing columns to the right. When deleting a column, columns to the right of the deleted column will move left. When we insert or delete a cell in the worksheet, Excel cannot tell which way to move other cells to accommodate the change, so it will request additional information in a dialog box. The delete key is not a shortcut for removing cells, rows, or columns. The delete key is a shortcut for deleting the contents of cells.

2 Inserting a blank column with a menu command To insert a new, blank column in a worksheet, select the Columns command from the Insert menu. When Excel inserts a new column, it always inserts it to the left of the column that contains the active cell. Since A1 was the active cell, the new blank column becomes column A, and the old columns A and B are moved to the right to become columns B and C. Inserting and Deleting Columns Rows and Cells, Slide 2Copyright © 2004, Jim Schwab, University of Texas at Austin

3 Inserting a blank column using a popup menu First, to insert a new blank column between columns B and C, we click on the column header for column C to select the entire column. Second, right click anywhere in column C and select Insert from the popup menu. The old column C is now column D, and column C is now a new blank column. Inserting and Deleting Columns Rows and Cells, Slide 3Copyright © 2004, Jim Schwab, University of Texas at Austin

4 Inserting a blank row with a menu command To insert a new, blank row in a worksheet, select cell A2 in the row beneath the position for the new row and select the Rows command from the Insert menu. When Excel inserts a new row, it always inserts it above the row that contains the active cell. With A2 as the active cell, the new blank row becomes row 2, and the old row 2 is moved down to become row 3. Note: we can also insert rows with the popup menu that appears when a row is selected. Inserting and Deleting Columns Rows and Cells, Slide 4Copyright © 2004, Jim Schwab, University of Texas at Austin

5 Inserting a cell with a menu command - 1 Inserting and Deleting Columns Rows and Cells, Slide 5Copyright © 2004, Jim Schwab, University of Texas at Austin Inserting a single cell in between other cells is more complicated that inserting a row or column. Excel cannot tell in advance what we want to do with the cells surround the position where the cell is inserted, so it will present us with an additional dialog box to clarify our request. First, to initiate inserting a cell, select the cell in the position where we want the new cell inserted. In this example, a new cell will be inserted in the position of the current cell F1. Second, with the target cell highlighted, select Cells on the Insert menu.

6 Inserting a cell with a menu command - 2 Inserting and Deleting Columns Rows and Cells, Slide 6Copyright © 2004, Jim Schwab, University of Texas at Austin Click on the Shift cells down option button to choose that option. Click on the OK button to complete the insertion. The Insert dialog box requires us to indicate what to do with other cells when the new cell is inserted. If we Shift cells right, the 2 in cell F1 will move to cell G1. If we Shift cells down, the 2 in cell F1 will move to cell F2, and the 4 in cell F2 will move to F3.

7 Inserting a cell with a menu command - 3 Inserting and Deleting Columns Rows and Cells, Slide 7Copyright © 2004, Jim Schwab, University of Texas at Austin The new blank cell is inserted at F1 and the existing cells are shifted downward as requested.

8 Deleting a column with a menu command - 1 To delete column A from the worksheet, select the column by clicking on its column header, A. With the entire column selected, select the Delete command from the Edit menu. The selected column is deleted and the columns to the right of it are all moved left one column. Inserting and Deleting Columns Rows and Cells, Slide 5Copyright © 2004, Jim Schwab, University of Texas at Austin

9 Deleting a column with a menu command - 2 Had we selected only a cell in column A, e.g. A1, instead of the entire column, we could still have deleted the column by choosing that option in the Delete dialog box. With cell A1 selected, select the Delete command from the Edit menu. Inserting and Deleting Columns Rows and Cells, Slide 6Copyright © 2004, Jim Schwab, University of Texas at Austin

10 Deleting a column with a menu command - 3 With only cell A1 selected, Excel cannot determine whether we want to delete cell A1, column A, or row 1, so it shows the Delete dialog box for us to specify our choice. Since we want to delete column A, we mark the Entire column option button. To complete the deletion, click on the OK button. Inserting and Deleting Columns Rows and Cells, Slide 7Copyright © 2004, Jim Schwab, University of Texas at Austin

11 Deleting a column with a menu command - 4 The old column A is deleted and the other old columns are moved one column to the left. Inserting and Deleting Columns Rows and Cells, Slide 8Copyright © 2004, Jim Schwab, University of Texas at Austin

12 Deleting a column using a popup menu To delete column B from the worksheet, select the column by clicking on its column header, B. Second, right click anywhere in column B and select Delete from the popup menu. The old column C is now column B, and column C is now a blank column. Inserting and Deleting Columns Rows and Cells, Slide 9Copyright © 2004, Jim Schwab, University of Texas at Austin

13 Deleting a row with a menu command To delete a row from a worksheet, select the entire row by clicking on its row header, 2, in this example. With the entire row selected, select the Delete command from the Edit menu. The selected row is deleted and the rows beneath it are all moved up one row. We can also delete rows with the popup menu. While I have deleted columns and rows 1 at a time, any number can be selected and deleted at once. We can also delete rows with the popup menu. While I have deleted columns and rows 1 at a time, any number can be selected and deleted at once. Inserting and Deleting Columns Rows and Cells, Slide 10Copyright © 2004, Jim Schwab, University of Texas at Austin

14 Deleting a cell with a menu command - 1 To delete cell A1 from the worksheet, make cell A1 the active cell and select the Delete command from the Edit menu. With cell A1 selected, select the Delete command from the Edit menu. Inserting and Deleting Columns Rows and Cells, Slide 11Copyright © 2004, Jim Schwab, University of Texas at Austin

15 Deleting a cell with a menu command - 2 The Delete dialog box is displayed so that we can choose what Excel does after it deletes the cell. If we choose to Shift cells left, Excel will move the contents of cell B1 (and all cells to the right of B1) to cell A1. If we choose to Shift cells up, Excel will move the contents of cell A2 (and all cells beneath A2) up to cell A1. Assuming we want to replace the contents of cell A1 with the contents of cell A2, we accept the default Shift cells up. Click on the OK button to complete the deletion. Inserting and Deleting Columns Rows and Cells, Slide 12Copyright © 2004, Jim Schwab, University of Texas at Austin

16 Deleting a cell with a menu command - 3 Cell A1 has been replaced by the contents that were in cell A2, and cell A2 is blank because there were no cells with data below it. We can also delete cells by right-clicking on a cell and choosing delete from the popup menu. Inserting and Deleting Columns Rows and Cells, Slide 13Copyright © 2004, Jim Schwab, University of Texas at Austin


Download ppt "Inserting and Deleting Columns, Rows, and Cells Inserting and Deleting Columns Rows and Cells, Slide 1Copyright © 2004, Jim Schwab, University of Texas."

Similar presentations


Ads by Google