Excel pastes filtered rows because the copy operation includes hidden rows by default, and the paste operation does not automatically exclude them. To paste only the visible rows, you need to explicitly tell Excel to copy only what you see. The quickest fix is to select the visible data, then use Home > Find & Select > Go to Special > Visible cells only before copying, or press Alt + ; (semicolon) after selecting the range. Alternatively, use Data > Filter to filter, then copy the visible cells and paste into a new location. If you are pasting into a filtered range, Excel may also paste into hidden rows, so you must ensure the destination is not filtered or use Paste Special > Values into an unfiltered area. This guide walks through the exact steps to copy and paste only visible rows, avoid common pitfalls, and troubleshoot when the fix does not work.
What You'll Need
- Microsoft Excel (any recent version: Microsoft 365, Excel 2019, 2021, or 2024) on Windows or Mac. The steps below use Windows shortcuts; Mac shortcuts are noted where they differ.
- A worksheet with filtered data (AutoFilter or manually hidden rows).
- Basic familiarity with selecting cells and using the ribbon or keyboard.
Step-by-Step
- Apply your filter. Select your data range, go to Data > Filter, and use the dropdown arrows to filter rows as needed. Hidden rows will collapse but remain in the worksheet.
- Select the visible data you want to copy. Click the first visible cell, then drag to the last visible cell, or use Ctrl + Shift + End (Windows) / Cmd + Shift + End (Mac) to extend the selection. Be aware this may include hidden rows in the selection; that is fine because the next step will exclude them.
- Select only visible cells. With the range selected, press Alt + ; (Windows) or Cmd + Shift + Z (Mac) to select visible cells only. Alternatively, go to Home > Find & Select > Go to Special, choose Visible cells only, and click OK. You will see the selection border change to indicate only visible cells are selected.
- Copy the selection. Press Ctrl + C (Windows) or Cmd + C (Mac). The marching ants will appear around the visible cells only.
- Paste into the destination. Click the top-left cell where you want the data to go. Ensure the destination area is not filtered and does not have hidden rows, because pasting into a filtered range can still place data into hidden rows. Press Ctrl + V (Windows) or Cmd + V (Mac). Only the visible rows you copied will be pasted.
- Verify the paste. Check that the pasted data contains only the rows that were visible in the source. If you see extra rows, undo with Ctrl + Z and repeat from step 3, making sure the visible-cells selection was active before copying.
Common Mistakes
- Copying before selecting visible cells. If you copy a range that includes hidden rows without first using Go to Special > Visible cells only or Alt + ;, Excel will copy all rows, including hidden ones.
- Pasting into a filtered destination. If the destination range has a filter applied, Excel may paste into hidden rows, causing data to appear in unexpected places. Clear filters on the destination sheet before pasting.
- Using regular paste instead of Paste Special. In some cases, using Paste Special > Values helps avoid formatting issues, but it does not automatically exclude hidden rows; you still need to copy only visible cells first.
- Forgetting to clear the clipboard. After copying, pressing Esc cancels the copy mode. If you accidentally copy again, you may include hidden rows.
- Assuming filtered rows are deleted. Filtering only hides rows; the data still exists. Copying without the visible-cells step will bring hidden rows along.
Tips
- Use Alt + ; as a quick keyboard shortcut to select visible cells only. It toggles the selection to exclude hidden rows and columns.
- If you frequently copy filtered data, consider using Excel Tables (Ctrl + T) and then filtering; copying from a filtered table still requires the visible-cells step, but tables make it easier to manage ranges.
- To paste into a filtered range without affecting hidden rows, first clear the filter, paste, then reapply the filter. Alternatively, paste into a new sheet and then move the data.
- When pasting into another application (e.g., Word, Outlook), the visible-cells selection is preserved, so only visible rows are pasted.
- On Mac, the shortcut for visible cells only is Cmd + Shift + Z, but you can also use Edit > Find > Go To and choose Special.
Troubleshooting
If pasting still includes hidden rows, check the following:
- Did you select visible cells only? After selecting the range, the status bar should show “Visible cells only” or the selection border should look different. If not, repeat step 3.
- Is the destination filtered? Clear any filters on the destination sheet (Data > Filter > Clear) before pasting.
- Are there manually hidden rows? The visible-cells selection also excludes manually hidden rows (rows you hid by right-clicking and choosing Hide). Ensure you want to exclude those as well.
- Is the paste operation using the correct option? Use Ctrl + V for a normal paste. If you use Paste Special, choose Values to avoid formatting issues, but remember it does not filter hidden rows by itself.
- Try copying to a new worksheet. Sometimes pasting into a fresh sheet avoids conflicts with existing filters or hidden rows.
- Check for merged cells. Merged cells can interfere with visible-cell selection. Unmerge cells before copying if needed.
If none of the above works, consider using a formula approach: in a new column, use =SUBTOTAL(103, A2) to identify visible rows (1 for visible, 0 for hidden), then filter on that column and copy. This is more advanced but reliable.
Frequently Asked Questions
Why does Excel paste hidden rows when I copy a filtered range?
By default, Excel copies all cells in a selected range, including hidden rows. Filtering only hides rows visually; it does not remove them from the selection. You must explicitly select visible cells only before copying.
What is the keyboard shortcut to select visible cells only?
On Windows, press Alt + ; (semicolon). On Mac, press Cmd + Shift + Z. These shortcuts toggle the selection to exclude hidden rows and columns.
Can I paste into a filtered range without affecting hidden rows?
No, pasting into a filtered range will place data into hidden rows as well. To avoid this, clear the filter on the destination, paste, then reapply the filter. Alternatively, paste into an unfiltered area and then move the data.
Does Paste Special > Values exclude hidden rows?
No, Paste Special > Values pastes all copied cells, including hidden ones, unless you first copy only visible cells. Always select visible cells before copying, regardless of the paste method.
How can I tell if only visible cells are selected?
When you use Go to Special > Visible cells only or Alt + ;, the selection border changes to a thin line around each visible cell block, and the status bar may show “Visible cells only.” You can also check by looking at the Name Box; it will show the range with “Visible” indicated in some versions.
What if I need to copy filtered data to another workbook?
The same principle applies: select visible cells only before copying, then paste into the other workbook. Ensure the destination workbook is not filtered. If you paste into a new sheet, the data will appear as values only.