If some cells, rows, or columns on a worksheet do not appear, you have the option of copying all cells—or only the visible cells. By default, Excel copies hidden or filtered cells in addition to visible cells. If this is not what you want, follow the steps in this article to copy visible cells only. For example, you can choose to copy only the summary data from an outlined worksheet.
Follow these steps:
-
Select the cells that you want to copy For more information, see Select cells, ranges, rows, or columns on a worksheet.
Tip: To cancel a selection of cells, click any cell in the worksheet.
-
Click Home > Find & Select, and pick Go To Special.
-
Click Visible cells only > OK.
-
Click Copy (or press Ctrl+C).
-
Select the upper-left cell of the paste area and click Paste (or press Ctrl+V).
Tip: To 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.
Note: 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 and paste visible cells in a range of data that has hidden cells or filtering applied, you’ll notice that the hidden cells are pasted along with the visible ones. Unfortunately, you can’t change this when you copy and paste a range of cells in Excel for the web because the option to paste only visible cells isn’t available.
However, if the data is formatted as a table with filtering applied, you can copy and paste only the visible cells.
If you don’t want to format the data as a table and if you have the Excel desktop application, you can open your workbook to copy and paste the visible cells there. To do that, click Open in Excel and follow the steps in Copy and paste visible cells only.
Have you ever tried to copy and paste a range with hidden rows or columns and didn’t get the results you expected? This problem can be frustrating and time consuming! In this post and video I will explain how to solve this problem with a very simple shortcut to select the visible cells only.
Have you ever tried to copy and paste a range with hidden rows or columns and didn’t get the results you expected?
This problem can be frustrating and time consuming! In this post and video I will explain how to solve this problem with a very simple shortcut. The shortcut will select the visible cells only in a range, ignoring the hidden rows and columns.
Please leave a comment below with any questions.
Why Are My Hidden Rows & Columns Being Pasted?
When you copy a range of cells that contains hidden rows or columns, Excel includes ALL of the selected rows. It does not matter if they are visible or hidden. When you go to paste the range, all the cells in the selection will be pasted.
This is actually a nice feature, but it’s not always what we are expecting to happen. Sometimes we only want to copy and paste the visible cells, and exclude the hidden rows & columns.
This commonly happens when you are working with a range that has filters applied to it. Or when you have hidden rows or columns from a collapsed group in an outline. The Subtotals feature automatically creates row groupings that can cause rows to be hidden, as shown in the example above.
Select the Visible Cells Only
Excel gives us an option to select the visible cells only using the keyboard shortcut Alt+; (hold down the Alt key, then press the semi-colon key). The Mac shortcut is Cmd+Shift+Z.
This shortcut will exclude all the hidden rows and columns from the selection.
Copy & Paste Visible Cells
Here are instructions on how to copy and paste visible cells only (please see the video above for details):
- Select the entire range you want to copy.
- Press Alt+; to select the visible cells only. You will notice that the selection is cut up to skip the hidden rows and columns.
- Copy the range – Press Ctrl+C or Right-click>Copy
- Select the cell or range that you want to paste to
- Paste the range – Press Ctrl+V or Right-click>Paste
Alternatives to Alt+;
If you don’t use this shortcut often then it might be hard to remember the keyboard shortcut. Here are a few alternatives for selecting visible cells.
Add a Button to the Quick Access Toolbar (QAT)
Please see the video for step-by-step instructions on how to add this button to the QAT. Pressing the button will select visible cells only. It also shows the keyboard shortcut when you hover your mouse over the button.
The Go To Special Menu
You can also find the Select Visible Cells Only option on the Go To Special menu.
This can be a very useful menu for selecting other types of cells besides just visible cells. As you can see in the image above there are a lot of options for different types of cells you can select.
There are a few different ways to open the Go To Special menu.
1. On the Home Tab of the Ribbon, press the Find & Select button on the far right side. Then choose Go To Special…
2. Press Ctrl+G or the F5 key on the keyboard from anywhere in a worksheet. Then press the Special button.
So Many Different Ways to Select Visible Cells
As you can see, there are a lot of different ways to select the visible cells in Excel. For me, the keyboard shortcut (Alt+;) is by far the fastest. If you don’t think you’ll remember it then put the button on the QAT. 🙂
Either way, this is one shortcut that should help save you a lot of time!
Paste to the Visible Cells Only
If you have ever received the following error message in Excel, “The command cannot be used on multiple selections”, then you know that you cannot paste to the visible cells in range that contains hidden rows or columns. This is a limitation of Excel, and it can be frustrating.
The video below explains two workarounds for this.
Click the following link to learn more about the Paste Visible feature and download a free trial of the Paste Buddy add-in.
Click here to get Paste Buddy
Copy Visible Cells to Outlook Email
Mandy asked a great question in the comments below about how to paste the visible cells to an email in Outlook. The following screencast animation shows how to do this.
Here are the steps to copy the visible cells to an email :
- Select visible cells in Excel – Alt+;
- Copy the range – Ctrl+C
- Open an email in Outlook
- Choose from the Paste Options on the Message tab
The Paste button on the Message tab of the Ribbon contains a small drop-down arrow underneath it. Click this arrow to see the Paste Options. You can hover over each of the options to get a preview of what the paste will look like in the email.
When copying and pasting from Excel to Outlook, I usually use either the “Picture” or “Keep Text Only” options. If I know the user will be copying the data out of Outlook, then it’s best to give them the text. If I know the user will only be looking at the data, then I will paste a picture because I know the formatting will remain in tact.
Please leave a comment below with any questions.
Learn how to copy and paste excluding hidden columns or rows in Excel.
Ever tried to copy and paste data thinking you will be pasting, excluding the hidden columns or rows only to have the hidden data copied too?
Copying a data range that contains hidden data can be challenging when the hidden data travels with the copied range.
In this post I’ll explain how to copy and paste the visible cells only – hidden cells are excluded.
This blog includes step-by-step help on the following:
- Why does Copy and Paste include hidden data in Excel?
- Copying and pasting visible cells only in Excel (excluding hidden cells)
- Excel Shortcuts for Copying and Pasting visible cells only (excluding hidden cells)
Why does Copy and Paste include hidden data in Excel?
Let’s look at what happens when we try to copy and paste a range with hidden data. In the example below we have an Excel spreadsheet with information on sales.
In this example, we are wanting to hide rows 6-9 and copy and paste the information in this data set without these rows included.
To follow along, rows 6-9 have been highlighted in yellow so that they are easily identified as we continue through the steps.
To hide these rows, we will do the following.
Step 1: Select the rows we want hidden by clicking and dragging over the row numbers. In our example, this is rows 6-9.
Step 2: Right-click the selected rows and then select Hide from the menu.
The rows we have selected will now be hidden.
You can see in our example, rows 6-9 are hidden. We can easily identify this as the highlighted rows are now hidden and the row numbers jump from 5 to 10.
Copying data that has hidden rows
Now let’s try copying the first 3 columns of data in this table to another worksheet. We are assuming that the hidden data will not copy because it is hidden.
Step 1: We will select the data range that we want to copy, including the hidden rows. In this example, we want to copy the Invoice number, Date and Customer Name columns.
Step 2: To copy the range we’ve selected, we will right-click the selected range and select Copy from the shortcut menu (or press Ctrl + C).
Step 3: We will now go to where we want to paste the data and select the cell that will be the top, left cell of the pasted range. In our example, we created a new sheet and are now wanting to paste the copied data into cell A3. The name of our new sheet is Sheet1 as this was the default name given to the sheet by Excel.
Step 4: We will now paste the copied data by doing a right-click and selecting Paste from the shortcut menu (or we can press Ctrl + V).
Step 5: Unfortunately, we can see that the hidden data has been copied and included when we paste. This is easily identifiable as you can see the rows we highlighted in yellow, prior to doing the copy, have also copied over.
This is because when we selected the data to be copied in Step 1, we are actually selecting both visible AND hidden data.
Therefore, when we copied we are copied ALL the data, not just the visible cells.
Most of the time this is not ideal, and you don’t want these hidden rows to travel over with the data you are copying and pasting.
The following steps will teach you how to paste visible cells only in Excel, excluding any hidden rows or columns.
Copying and pasting visible cells only in Excel (excluding hidden cells)
Step 1: Start by selecting the area you want to copy. In our example we will select the Invoice, Date and Customer Name columns. The highlighted rows 6 to 9 are hidden.
Step 2: From the Home tab, select Find & Select.
Step 3: Select Go To Special.
The Go To Special dialogue box will appear.
Step 4: Select Visible cells only. This ensures only the visible cells are included in your selection. The hidden cells are excluded.
Step 5: Click OK.
You will now see that the visible cells have been selected and the hidden cells are excluded. A small line within the selected area shows this .
Step 6: Now Copy the selected cells by right-clicking over the selected area and selecting Copy from the shortcut menu (or press Ctrl + C).
Step 7: Go to where you want to paste the data and select the cell that will be the top, left cell of the pasted range. In our example, we created a new sheet called Sheet 1 as this is the default name given by Excel and we selected cell A3.
Step 8:
Paste by doing a right-click and selecting Paste from the shortcut menu (or press Ctrl + V).
Super Tip: If you want to paste your cells with the exact same column widths as the sheet they were copied from, when you go to paste do a right-click and select Paste Special. From there, select Keep Source Column Widths (W).
Only the visible cells will be pasted.
In this example, we can easily tell that only the visible cells have been pasted as the hidden rows were highlighted in yellow and they have not appeared.
Excel Shortcuts for Copying and Pasting visible cells only (excluding hidden cells)
1. Select the range to be copied, including the hidden data.
2. Press ALT + ; (ALT + semicolon to select only visible data and exclude any hidden data)
3. Press Ctrl + C (to copy)
4. Go to where you want to paste the data and select the cell that will be the top, left cell of the pasted range.
5. Press Ctrl + V (to paste the data).
To Sum up
The trick is to ensure you are only selecting visible cells prior to doing your Copy.
Once you have this mastered you can easily control your data and copy visible cells only.
Was this blog helpful? We’d love to know. If you’re a beginner or if you use Excel every day please let us know if we helped in some way by leaving a Comment below.
Instructions
Copying and pasting visible cells only in Excel (excluding hidden cells)
- Select the area you want to copy.
- From the Home tab, select Find & Select.
- Select Go To Special. The Go To Special dialogue box will appear.
- Select Visible cells only. This ensures only the visible cells are included in your selection. The hidden cells are excluded.
- Click OK. You will now see that the visible cells have been selected and the hidden cells are excluded. A small line within the selected area shows this.
- Now Copy the selected cells by right-clicking over the selected area and selecting Copy from the shortcut menu (or press Ctrl + C).
- Go to where you want to paste the data and select the cell that will be the top, left cell of the pasted range.
- Paste by doing a right-click and selecting Paste from the shortcut menu (or press Ctrl + V).
Excel Shortcuts for Copying and Pasting visible cells only (excluding hidden cells)
- Select the range to be copied, including the hidden data.
- Press ALT + ; (ALT + semicolon to select only visible data and exclude any hidden data)
- Press Ctrl + C (to copy)
- Go to where you want to paste the data and select the cell that will be the top, left cell of the pasted range.
- Press Ctrl + V (to paste the data).
Notes
Why does Copy and Paste include hidden data in Excel?
When you select a range that has hidden data, you are also selecting that hidden data. This means that when you copy and paste the data, the hidden data will be copied and pasted with it. If you want to copy and paste visible cells only, the trick is to ensure you are only selecting visible cells prior to doing your Copy.
Copying and pasting visible cells only in Excel (excluding hidden cells)
Super Tip: If you want to paste your cells with the exact same column widths as the sheet they were copied from, when you go to paste do a right-click and select Paste Special. From there, select Keep Source Column Widths (W).
If you enjoyed this post check out the related posts below.
Elevate your Excel game and become a pro with our exclusive Insider Group.
Be the first to know about new tutorials, videos, and tips for Microsoft 365 products. Join us now and claim your exclusive bonus today!
Have you ever wanted to only copy or paste visible cells?
For example, below I have a table containing outstanding customer invoices. I want to insert a formula in column E to insert an overdue fee for invoices outstanding longer than 31 days:
However, I don’t want the formula on the subtotal rows (row 5, 11, 13, 19, 21 etc.)
I can use the Group buttons to quickly hide the subtotal rows. I’ve entered my formula in cell E2 and I just need to copy it down:
Note: The method of hiding the rows doesn’t make any difference to how this technique works. You could use filters, or a regular right-click on the row label > Hide, to hide the Subtotal rows. I used the Group tool on the Data tab of the ribbon so I could easily hide/unhide the rows for the purpose of writing this tutorial quickly.
The problem with a regular copy and paste is Excel will also paste to the hidden cells, so I have to select the visible cells first. I can do this with Go To Special:
- Copy cell E2 to the clipboard – just select it and press CTRL+C
- Select the range you want to paste to. In my case E3:E51
- Press CTRL+G to open the Go To dialog box and then click ‘Special’ in the bottom left:
- In the Go To Special dialog box select the ‘Visible cells only’ button and click OK.
Notice how each group of cells are individually selected:
- You can go ahead and press CTRL+V to paste the formula into the visible cells. I’ve unhidden the subtotal rows in the image below so you can see the magic:
Tip: Instead of copying and pasting, I could enter the same formula in all the selected visible cells using steps 2 to 4 above, then for step 5: type in the formula and press CTRL+ENTER to enter them all in one go.
Copy Visible Cells Only
Copying cells in a filtered table will only copy the visible cells by default, but if you have hidden rows or columns (as opposed to filtered), then Excel will copy the hidden ones too.
For example, you can see in the data below that row 3 is hidden:
We can use the same technique to only copy visible cells:
- Select the range A2:E9
- CTRL+G to open the Go To dialog box
- Click ‘Special’
- Select ‘Visible cells only’
You can see there is a subtle line between rows 2 and 4 indicating row 3 is not selected:
- Press CTRL+C to copy and then go ahead and paste the cells where you want. You’ll notice they are pasted as a contiguous range of the 7 copied rows:
Filtered Tables
By default copying and pasting in filtered tables only does so for visible cells, although I have experienced occasions where this didn’t work as it should (but I couldn’t replicate it for this post 🙁 ), so I always use this technique, even in a filtered table.
In Microsoft Excel, we can easily copy the range of cells and paste it to some destination.
This can simply be done using the following steps.
- Select the range of the cell
- Copy the selected range using Ctrl + C command
- Paste the copied cell to the destination using Ctrl + V command
But imagine a situation where we have some cells that are hidden in the range (like in the below example).
In the above data, rows 4 to 7 are hidden.
Now, if I copy this data that has hidden rows and paste it a few rows below it, something weird happens.
The hidden rows are also copied and pasted (as shown below)
By default, Excel copies the visible and hidden cells as shown in the above screenshot. So how to overcome this and only select the visible cell?
This tutorial will guide you through all the methods using which you can select the visible cell only in Excel.
Method 1: Keyboard Shortcut to Select Visible Cells Only
This is the easiest method to copy and paste the visible cell only in Excel.
Below is the keyboard shortcut to select the visible cells only:
ALT + ; (for windows)
or
Cmd + Shift + Z (for mac)
Let me explain it with the help of an example in which I am going to use the below dataset, where we have some Employee records with rows 4-7 hidden.
Let’s see how we can select the visible cell only. To achieve this, follow the below steps
- Select the range of data that you want to copy.
- Press the shortcut ALT + ; from the keyboard (hold the ALT key and then press the semicolon key). Remember the command for Mac users is Cmd + Shift + Z.
- To copy the visible range, press Ctrl + C from the keyboard. Some dotted lines appear around the selection, as shown below.
- Paste the cell to the destination using Ctrl + V command
This will paste only the visible cells and exclude the hidden cells, as you can see from the above screenshot.
There are other methods to perform this, which are discussed in the below sections.
Also read: How to Select Every Other Row (Alternate Row) in Excel?
Method 2: Select Visible Cells Only Using the Go to Special Dialog Box
Using the shortcut key (Alt + 😉 is a simple and easy way to copy only visible cells in Excel, but if you don’t want to remember the keyboard shortcut, you can do so by using the Go To Special option that is available in the Home tab of the ribbon.
Let me show you with the help of an example where I am going to use the same employee record data where rows 4-7 are hidden, as shown below.
- Select the range of cells you want to copy.
- Click on the Home tab in the ribbon
- In the Home tab, click on the Find & Select option.
- From the dropdown that gets open select the Go To Special option
This will open the Go To Special dialog box as shown below
- Click on the option Visible cells only
- Click on OK.
In this way, Excel will not follow the default copy-paste mechanism but only copy the visible cell.
- To copy the selected range press Ctrl + C
- Select the cell where you want to paste the range and press Ctrl + V
In this method, I showed you in great detail how you can use the Go To Special option to copy only visible cells.
There is another way you can do so, which is discussed in the below section.
Method 3: By Adding Select Visible Cells Option to Quick Access Toolbar
The above-discussed methods work perfectly for copying visible cells to the destination, but if you like to make it simpler, you can add the Select Visible Cells option to your Quick Access toolbar.
By doing so, you don’t have to remember the shortcut or the long process discussed in method 2.
In this method, first, I will explain how you can add a Select Visible Cells option to the toolbar, and then I will show you how you can quickly copy only visible cells using this option.
So follow all the steps to get a complete insight into the whole process.
a) Add the Select Visible Cells option to Quick Access Toolbar
- Click on the Customizable Quick Access Toolbar option
- From the dropdown that gets open, choose More Commands option
This will open Excel Options as shown below
- Click on the ‘Choose commands from’ option
- From the drop-down that gets opens, choose the “All Commands” option
This will show all the commands in Excel
- Scroll down the command’s list and choose the Select Visible Cells option.
- Click on Add
- Then click on OK
This will add the Select Visible Cells option to the toolbar as shown below
b) Copy Visible Cell using the Select Visible Cells option
In the first part of this method, I showed you how you could add the Select Visible Cells option to your Quick Access Toolbar.
Now I will show you how you can employ this option to copy only visible cells just in a single click.
I am going to use the same dataset that is used in method 1 and method 2, where rows 4-7 are hidden.
- Select the data that you want to copy.
- Click on the Select Visible Cells icon in the Quick Access Toolbar (QAT)
- Copy the data using Ctrl + C
- Paste the data to the destination using Ctrl + V
This will only paste only the visible cell and exclude the hidden ones as shown in the above screenshot.
Tip: In the first part of this method, I also showed you how you could add the Select Visible Cells command to this Quick Access Toolbar. Similarly, you can also add any other command using the same process. Just look for the required command in the command’s list and add it using the procedure discussed in the above method.
If you’re a heavy Excel user, I am sure you will soon encounter this situation where you only need to select the visible cells (and not the hidden ones).
In this tutorial, I have discussed all the methods you can use to copy visible cells only.
I am personally a big fan of the keyboard shortcut, but in case you don’t want to burden yourself with yet another shortcut, you can add the select visible cells only icon in the Quick Access Toolbar and get this done with a single click.
Other Excel articles you may also like:
- How to Select Non-adjacent Cells in Excel?
- Select Row (or Rows) in Excel (Shortcut)
- How to Select Rows with Specific Text in Excel
- How to Select Multiple Items from a Drop Down in Excel?
- How to Select Multiple Rows in Excel
- How to Select Alternate Columns in Excel (or every Nth Column)
- How to Select Every Other Cell in Excel (Or Every Nth Cell)
- How to Paste in a Filtered Column Skipping the Hidden Cells