Contextures

Filters > AutoFilter > Troubleshoot

Filtered List Copy Paste Problems

See how to copy paste when filter is applied in Excel list. Use Excel shortcut to copy right or left. Workaround to copy paste multiple cells, avoid problem pasting in hidden cells

dates pasted in continuous block of cells

Video: Problem Pasting in Filtered List

This video shows the problems that you can have when you try to copy and paste data into a filtered list.

See why the problem occurs, and a couple of workarounds, to avoid the problem. There are written steps below the video.

Video Timeline

  • 00:00 Introduction
  • 00:13 Filter a Sales List
  • 00:48 Copy Visible Row Data
  • 01:06 Paste in Filtered Rows
  • 01:36 Check Incorrect Pasted Data
  • 02:23 Workaround 1: Sort Data
  • 02:57 Workaround 2: New Column
  • 04:15 Conclusion

Problem Pasting in Filtered List

It should be easy to filter a list in Excel, and then copy cells from one column, and paste into a different column. However, Excel pastes into the hidden rows too, and that can create serious problems in your workbook.

The steps and screen shots below show the problem you might have, when pasting into a filtered list.

Getting Ready to Copy and Paste

For example, in the Sales Order table shown below:

  • There are a few blank cells in the ShipDate column.
  • Those products were sent out on the same day they were ordered
  • I'll copy the column A dates into column E
  • It's important that the existing shipping dates (highlighted in yellow) are not deleted or changed

blank cells in ShipDate column

Filter, Copy & Paste

It seems simple enough - just filter the list, copy dates, then paste into the blank cells.

To do that, I tried the following steps -- but things did not go well!

  • ShipDate column is filtered, to show only the rows with blank cells in that column.
  • With some of the rows hidden by the filter, I selected 6 cells in column B
  • Then, I copied copied the selected cells, with the shortcut, Ctrl + C
  • After that, I selected cell E6, and pasted there, with the shortcut, Ctrl + V

However, there is a problem, as you can see in the screen shot below:

  • only 2 of the 6 dates appeared in column E
  • one of the dates is in the wrong row - date from row 28 is in row 9

What happened to the other 4 dates?

two dates appear in ShipDate column

Find Missing Data

What happened to the other 4 dates that I copied and pasted into column E?

To start troubleshooting the paste problem, I followed these steps:

  • First, I cleared the filter on the ShipDate column
  • With the filter removed, I could see that all 6 dates had been pasted into column E.
  • Dates had been pasted into a continuous block of 6 cells
    • starting with cell E6
    • down to cell E11
  • Some of the existing ShipDates had been overwritten!

dates pasted in continuous block of cells

Fortunately, I noticed the problem immediately, so I followed these steps to fix the mess:

  • Press Ctrl + Z (twice) to undo the previous steps
  • OR, use the Undo command on the Home tab of the Excel Ribbon.

Warning: Copy and Paste Limitation

warning

To keep your data safe, when working with filtered lists, remember this Excel limitation:

  • Excel can COPY multiple values from the visible rows only
  • Excel CANNOT PASTE multiple values into the visible rows only

Video: Copy Values to Same Filtered Row

If you are copying and pasting in the same rows in a filtered list, you can use Excel's built-in fill commands. With this technique, you can safely copy data from one column to another, without losing data in the hidden rows.

Watch this video to see the steps, and there are written instructions below the video. The full transcript is available below the video.

Video Timeline

  • 0:00 Introduction
  • 0:42 Select Visible Cells
  • 1:08 Copy to the Right
  • 1:42 Copy to the Left

Video Transcript

If you'd like to read the video transcript, click on the green check box below. When you're finished, you can click the check box again, to hide the transcript

Video Transcript

Here is the full transcript of the video above -- Use Shortcut to Paste in Excel Filtered List - From Same Rows.

Introduction

In my previous video, I showed you the problems you can run into when you try and copy and paste in a filtered list.

For example, if I filter this list to only show the chocolate chips, and then try to copy these dates, and paste them into this column, it doesn't paste correctly.

So I'm going to do a copy (we can see they're copied here) and then paste, and only two of them show up. The rest have been pasted in the background, in the hidden rows.

So I'm going to undo that, and I'm going to show you a tip that I learned from my friend, Khushnood Viccaji, and it makes copying and pasting much easier.

Select Visible Cells

First, I'm going to select the cells that I want to copy.

Then press Ctrl and select the cells where you want to paste the data.

To get this information from here to here, we're going to make sure only the visible cells are selected.

So press the Alt key and semi-colon(;)

And now only the visible cells in our selection are selected, and you can see little lines to separate them.

Copy to the Right

Now to get from here to here, we're going to fill, and we can fill to the right.

So I'm going to use the keyboard shortcut, which is Ctrl + R and it takes this data, and puts it in the cell to the right.

Even though it wasn't to the immediate right, that shortcut works well for getting information to the next cell that's selected on the right.

So none of the other data was overwritten. We can see that all the data went into the correct cells.

Now in this case, we were filling to the right, so we could use a keyboard shortcut.

Copy to the Left

But if these dates weren't filled in and we wanted to copy from here to the left, there's no shortcut for that.

So I'm going to select these cells first, and then the cells where I want to paste.

Again, to select just the visible cells (press) Alt + Semi-colon; go to the HOME tab, and here's the fill.

If I click that I can fill left, and now the dates from this cell are filled into the selected cells at the left.

Get the Workbook

For more Excel tips and tutorials, and to download the sample file for this video, please visit my Contextures website at www.contextures.com

Solution: Paste Into Same Row - Shortcut

Here are the steps for copying values from one column to another, in the same row.

  • Note: This technique will work, even if the columns are not adjacent to one another.

Note: Thanks to Khushnood Viccaji (LinkedIn profile), who shared this tip.

Copy to the Right

To copy data to the right, into the same rows in a filtered list follow the steps below.

Step 1 - Select Cells

A) If your data to copy is in Column A:

  • In the filtered list, select the cells where you want to paste
  • Press the Ctrl key on your keyboard, and then select the cells that you want to copy (in the same rows)

B) If your data to copy is NOT in Column A:

  • In the filtered list, select the cells that you want to copy
  • Press the Ctrl key on your keyboard, and then select the cells where you want to paste (in the same rows)

Step 2: Complete the Copy and Paste

  • Next, to select only the visible cells in the selection, press the keyboard shortcut:
    • Alt + ;     (Alt + semi-colon)
  • Finally, to copy to the right, press the keyboard shortcut:
    • Ctrl + R

OR, Copy to the Left

To copy data to the left, into the same rows in a filtered list follow the steps below:

  • In the filtered list, select the cells that you want to copy
  • Press the Ctrl key on your keyboard, and then select the cells where you want to paste (in the same rows)
  • Next, to select only the visible cells in the selection, press the keyboard shortcut:
    • Alt + ;     (Alt + semi-colon)
  • Finally, to copy to the left, go to the Home tab on the Excel Ribbon
    • There isn't a built-in Excel keyboard shortcut to Fill Left
  • At the right end of the Home tab, find the Editing group
  • Click the Fill command, then click the Left command

use Fill Left command on Excel Home tab

Workarounds: Avoid Pasting in Filtered List

If possible, use the Fill Right or Fill Left shortcut solution, shown above, to copy and paste data in a filtered list.

However, that technique will only work if you copy and paste values within the same row

If you are copying data from another location, and want to paste it into a filtered list, here are a few workaround options for dealing with this situation.

  1. Fill Right or Left: If you're copying values within the same row, from one column to another, use the Fill Right or Fill Left technique, shown in the sections below.
  2. Sort the Data: Instead of filtering, sort your data, to bring together the rows where you want to paste multiple cells. Then, copy your data from another location, and paste into the sorted (but not filtered) rows. There are sorting tips on the Sort Excel Data page.
  3. Mark the Rows: For filters that are more complex, where you can’t do a simple filter to bring the rows together, you could insert a temporary column, and mark the rows, as shown in the screen shot below. Then, clear the filters, sort by the temporary "mark" column, and copy and paste in the marked rows

rows marked and sorted

Get the Sample File

Copy Paste Problem: Download the Filtered List Copy Paste sample file used in the videos on this page. The zipped Excel file is in xlsx format, and does not contain macros.

More Tutorials

Copy Number Cells Only

Copy Paste Error Problems

AutoFilter Basics

AutoFilter Tips & Fixes

AutoFilter Programming

About Debra

 

Last updated: November 24, 2023 9:50 AM