Friday, February 23, 2018

Move or copy cells and cell contents

Move or copy cells and cell contents

You can use the Cut, Copy, and Paste commands in Microsoft Excel to move or copy cells or their contents. You can also copy specific contents or attributes from the cells. For example, you can copy the resulting value of a formula without copying the formula itself, or you can copy only the formula.

When you move or copy a cell, Excel moves or copies the cell, including formulas and their resulting values, cell formats, and comments. Here's how:

  1. Select the cells that you want to move or copy.

    How to select cells or ranges

  2. On the Home tab, in the Clipboard group, do one of the following:

    Excel Ribbon Image

    • To move cells, click Cut Button image .

      Keyboard shortcut    You can also press Ctrl+X.

    • To copy cells, click Copy Button image .

      Keyboard shortcut     You can also press Ctrl+C.

  3. Select the upper-left cell of the paste area.

    Tip: To move or copy a selection to a different worksheet or workbook, click another worksheet tab or switch to another workbook, and then select the upper-left cell of the paste area.

  4. On the Home tab, in the Clipboard group, click Paste Button image .

    Keyboard shortcut     You can also press Ctrl+V.

Notes: 

  • Excel displays an animated moving border around cells that were cut or copied. To cancel a moving border, press Esc.

  • Excel replaces existing data in the paste area when you cut and paste cells to move them.

  • To choose specific options when you paste cells, you can click the arrow below Paste Button image , and then click the option that you want. For example, you can click Paste Special or Picture.

  • By default, Excel displays the Paste Options button on the worksheet to give you special options when you paste cells, such as Keep Source Formatting. If you don't want to display this button every time that you paste cells, you can turn this option off. Click the File tab, and then click Options. In the Advanced category, under Cut, Copy, and Paste, clear the Show Paste Options button when content is pasted check box.

Move or copy cells by using a mouse

By default, drag-and-drop editing is turned on so that you can use the mouse to move and copy cells.

  1. Select the cells or range of cells that you want to move or copy.

    How to select cells or ranges

  2. Do one of the following:

    • To move a cell or range of cells, point to the border of the selection. When the pointer becomes a move pointer Excel Move Pointer , drag the cell or range of cells to another location.

    • To copy a cell or range of cells, hold down Ctrl while you point to the border of the selection. When the pointer becomes a copy pointer Excel Copy Pointer , drag the cell or range of cells to another location.

Note: Excel replaces existing data in the paste area when you move cells.

When you copy cells, cell references automatically adjust. But, when you move cells, cell references are not adjusted, and the contents of those cells and of any cells that point to them may be displayed as reference errors. In this case, you have to adjust the references manually.

If the selected copy area includes hidden cells, rows, or columns, Excel copies them. You may have to unhide data temporarily you don't want to include when you copy information.

Top of Page

Insert moved or copied cells between existing cells

  1. Select the cell or range of cells that contains the data that you want to move or copy.

    How to select cells or ranges

  2. On the Home tab, in the Clipboard group, do one of the following:

    Excel Ribbon Image

    • To move the selection, click Cut Button image .

      Keyboard shortcut     You can also press Ctrl+X.

    • To copy the selection, click Copy Button image .

      Keyboard shortcut     You can also press Ctrl+C.

  3. Right-click the upper-left cell of the paste area, and then click Insert Cut Cells or Insert Copied Cells.

    Tip    To move or copy a selection to a different worksheet or workbook, click another worksheet tab or switch to another workbook, and then select the upper-left cell of the paste area.

  4. In the Insert Paste dialog box, click the direction in which you want to shift the surrounding cells.

Note    If you insert whole rows or columns, the surrounding rows and columns are shifted down and to the left.

Top of Page

Copy visible cells only

If some cells, rows, or columns on the worksheet are not displayed, you have the option of copying all cells or only the visible cells. For example, you can choose to copy only the displayed summary data on an outlined worksheet.

  1. Select the cells that you want to copy.

    How to select cells or ranges

  2. On the Home tab, in the Editing group, click Find & Select, and then click Go To Special.

    Excel  Ribbon Image

  3. Under Select, click Visible cells only, and then click OK.

  4. On the Home tab, in the Clipboard group, click Copy Button image .

    Excel Ribbon Image

    Keyboard shortcut     You can also press Ctrl+C.

  5. Select the upper-left cell of the paste area.

    Tip: To move or copy a selection to a different worksheet or workbook, click another worksheet tab or switch to another workbook, and then select the upper-left cell of the paste area.

  6. On the Home tab, in the Clipboard group, click Paste Button image .

    Keyboard shortcut     You can also press Ctrl+V.

  • If you click the arrow below Paste Button image , you can choose from several paste options to apply to your selection.

Excel pastes the copied data into consecutive rows or columns. If the paste area contains hidden rows or columns, you might have to unhide the paste area to see all of the copied cells.

When you copy or paste hidden or filtered data to another application or another instance of Excel, only visible cells are copied.

Top of Page

Prevent copied blank cells from replacing data

  1. Select the range of cells that contains blank cells.

    How to select cells or ranges

  2. On the Home tab, in the Clipboard group, click Copy Button image .

    Excel Ribbon Image

    Keyboard shortcut     You can also press Ctrl+C.

  3. Select the upper-left cell of the paste area.

  4. On the Home tab, in the Clipboard group, click the arrow below Paste Button image , and then click Paste Special.

  5. Select the Skip blanks check box.

Top of Page

Move or copy just the contents of a cell

  1. Double-click the cell that contains the data that you want to move or copy.

    Note    By default, you can edit and select cell data directly in the cell by double-clicking it, but you can also edit and select cell data in the formula bar.

  2. In the cell, select the characters that you want to move or copy.

    How to select characters in a cell

    To select the contents of a cell

    Do this

    In the cell

    Double-click the cell, and then drag across the contents of the cell that you want to select.

    In the formula bar

    Button image

    Click the cell, and then drag across the contents of the cell that you want to select in the formula bar.

    By using the keyboard

    Press F2 to edit the cell, use the arrow keys to position the cursor, and then press Shift+Arrow key to select the contents.

  3. On the Home tab, in the Clipboard group, do one of the following:

    Excel Ribbon Image

    • To move the selection, click Cut Button image .

      Keyboard shortcut     You can also press Ctrl+X.

    • To copy the selection, click Copy Button image .

      Keyboard shortcut     You can also press Ctrl+C.

  4. In the cell, click where you want to paste the characters, or double-click another cell to move or copy the data.

  5. On the Home tab, in the Clipboard group, click Paste Button image .

    Keyboard shortcut     You can also press Ctrl+V.

  6. Press ENTER.

    Note: When you double-click a cell or press F2 to edit the active cell, the arrow keys work only within that cell. To use the arrow keys to move to another cell, first press Enter to complete your editing changes to the active cell.

Top of Page

Copy cell values, cell formats, or formulas only

When you paste copied data, you can do any of the following:

  • Paste only the cell formatting, such as font color or fill color (and not the contents of the cells).

  • Convert any formulas in the cell to the calculated values without overwriting the existing formatting.

  • Paste only the formulas (and not the calculated values).

  • Select the cell or range of cells that contains the values, cell formats, or formulas that you want to copy.

    How to select cells or ranges

  • On the Home tab, in the Clipboard group, click Copy Button image .

    Excel Ribbon Image

    Keyboard shortcut     You can also press Ctrl+C.

  • Select the upper-left cell of the paste area or the cell where you want to paste the value, cell format, or formula.

  • On the Home tab, in the Clipboard group, click the arrow below Paste Button image , and then do one of the following:

    • To paste values only, click Values.

    • To paste cell formats only, click Formatting.

    • To paste formulas only, click Formulas.

      Note: If the copied formulas contain relative cell references, Excel adjusts the references (and the relative parts of mixed cell references) in the duplicate formulas. For example, suppose that cell B8 contains the formula =SUM(B1:B7). If you copy the formula to cell C8, the duplicate formula refers to the corresponding cells in that column: =SUM(C1:C7). If the copied formulas contain absolute cell references, the references in the duplicate formulas are not changed. If you do not get the results that you want, you can also change the references in the original formulas to either relative or absolute cell references and then recopy the cells.

Top of Page

Copy cell width settings

When you paste copied data, the pasted data uses the column width settings of the target cells. To correct the column widths so that they match the source cells, follow these steps.

  1. Select the cells that you want to move or copy.

    How to select cells or ranges

  2. On the Home tab, in the Clipboard group, do one of the following:

    Excel Ribbon Image

    • To move cells, click Cut Button image .

      Keyboard shortcut     You can also press Ctrl+X.

    • To copy cells, click Copy Button image .

      Keyboard shortcut     You can also press Ctrl+C.

  3. Select the upper-left cell of the paste area.

    Tip: To move or copy a selection to a different worksheet or workbook, click another worksheet tab or switch to another workbook, and then select the upper-left cell of the paste area.

  4. On the Home tab, in the Clipboard group, click the arrow under Paste Button image , and then click Keep Source Column Widths.

Top of Page

How to select cells or ranges

To select

Do this

A single cell

Click the cell, or press the arrow keys to move to the cell.

A range of cells

Click the first cell in the range, and then drag to the last cell, or hold down Shift while you press the arrow keys to extend the selection.

You can also select the first cell in the range, and then press F8 to extend the selection by using the arrow keys. To stop extending the selection, press F8 again.

A large range of cells

Click the first cell in the range, and then hold down Shift while you click the last cell in the range. You can scroll to make the last cell visible.

All cells on a worksheet

Click the Select All button.

Select All button

To select the complete worksheet, you can also press Ctrl+A.

Note: If the worksheet contains data, Ctrl+A selects the current region. Pressing Ctrl+A again selects the whole worksheet.

Nonadjacent cells or cell ranges

Select the first cell or range of cells, and then hold down Ctrl while you select the other cells or ranges.

You can also select the first cell or range of cells, and then press Shift+F8 to add another nonadjacent cell or range to the selection. To stop adding cells or ranges to the selection, press Shfit+F8 again.

Note: You can't cancel the selection of a cell or range of cells in a nonadjacent selection without canceling the selection.

A complete row or column

Click the row or column heading.

Worksheet headings

1. Row heading

2. Column heading

You can also select cells in a row or column by selecting the first cell and then pressing Ctrl+Shift+Arrow key (Right Arrow or Left Arrow for rows, Up Arrow or Down Arrow for columns).

Note: If the row or column contains data, Ctrl+Shift+Arrow key selects the row or column to the last used cell. Pressing Ctrl+Shift+Arrow key again selects the whole row or column.

Adjacent rows or columns

Drag across the row or column headings. Or select the first row or column, then hold down Shift while you select the last row or column.

Nonadjacent rows or columns

Click the column or row heading of the first row or column in your selection. Then hold down Ctrl while you click the column or row headings of other rows or columns that you want to add to the selection.

The first or last cell in a row or column

Select a cell in the row or column, and then press Ctrl+Arrow key (Right Arrow or Left Arrow for rows, Up Arrow or Down Arrow for columns).

The first or last cell on a worksheet or in a Microsoft Office Excel table

Press Ctrl+Home to select the first cell on the worksheet or in an Excel table.

Press Ctrl+End to select the last cell on the worksheet or in an Excel table that contains data or formatting.

Cells to the last used cell on the worksheet (lower-right corner)

Select the first cell, and then press Ctrl+Shift+End to extend the selection of cells to the last used cell on the worksheet (lower-right corner).

Cells to the beginning of the worksheet

Select the first cell, and then press Ctrl+Shift+Home to extend the selection of cells to the beginning of the worksheet.

More or fewer cells than the active selection

Hold down Shift while you click the last cell that you want to include in the new selection. The rectangular range between the active cell and the cell that you click becomes the new selection.

Tip: To cancel a selection of cells, click any cell on the worksheet.

Top of Page

No comments:

Post a Comment