How to Select Only Visible Cells in Excel (3 Quick Ways)

Sumit Bansal
Written by

Sumit Bansal is the founder of TrumpExcel.com and a 13-time Microsoft Excel MVP. He started this site in 2013 to share his passion for Excel through easy tutorials, tips, and training videos, helping you master Excel, boost productivity, and maybe even enjoy spreadsheets!

Last updated

What do you do when you have to copy a range of cells in Excel and paste it somewhere else?

In most cases, the below three steps get the work done:

  1. Select the cells that you want to copy.
  2. Copy the cells (Control + C).
  3. Select the destination cell and paste these cells (Control + V).

But what if you have some hidden cells in the dataset?

Then, these above three steps are not enough. Let me show you what happens when you try to copy cells that have hidden rows/columns in it.

Below I have a list of workshop sign-ups where rows 5 to 7 are hidden. Note that there are hidden rows in this dataset (look at the row numbers).

Workshop sign-ups dataset where rows 5 to 7 are hidden (the row numbers jump from 4 to 8)

Now see what happens when I select these cells, copy them, and paste them somewhere else.

A plain copy and paste brings back all 12 sign-ups, including the hidden ones

In the above example, I selected the cells I could see, but when I pasted these cells into another location, it copied the visible as well as the hidden cells. The three hidden sign-ups (Walter Powell, Ethan Gibson, and Sandra Bailey) are back in the pasted data.

This happens because when you select A1:E13, Excel also selects the hidden rows 5 to 7 inside that range, even though you can’t see them.

The workaround to this is to make sure that Excel only selects the visible cells. Then I can copy and paste these visible cells only.

In this tutorial, I will show you three ways to select visible cells only in Excel. I’ll also show you how this works with filtered data and with grouped (subtotaled) data.

Follow along with the example file

Select Visible Cells Excel.xlsx

Download

Select Visible Cells Using a Keyboard Shortcut (Alt + 😉

The easiest way to select visible cells in Excel is by using the following keyboard shortcut:

  • For Windows: ALT + ; (hold the ALT key and then press the semicolon key)
  • For Mac: Cmd + Shift + Asterisk (the * key)
  • For Excel for the web: ALT + ; (same as Windows)

Let’s use it on the same workshop sign-ups, where rows 5 to 7 are hidden and I want to copy only the visible rows.

Workshop sign-ups with rows 5 to 7 hidden

Here are the steps to select only the visible cells and copy them:

  1. Select the dataset (A1:E13 in this example).
The dataset A1:E13 selected
  1. Press ALT + ; to select only the visible cells.
Only the visible cells selected, with thin white lines where the hidden rows are

You can tell it worked by the thin white lines that appear in the selection where the hidden rows are. Excel has now split your selection into separate blocks of visible cells.

  1. Press Control + C to copy the visible cells (notice the marching ants around the selection).
The visible cells copied, with marching ants around each block
  1. Select the destination cell and press Control + V to paste.
Pasted result with only the nine visible sign-ups

This time, the pasted data has only the nine visible sign-ups, and Walter Powell, Ethan Gibson, and Sandra Bailey stay out of it.

This works the same way with hidden columns. If a column in your selection is hidden, ALT + ; leaves it out too.

Also read: How to Swap Cells in Excel?

Select Visible Cells Using the Go To Special Dialog Box

While using the keyboard shortcut is the fastest way to select visible cells, if you don’t want to use the keyboard or don’t remember the shortcut, there is another way.

You can use the ‘Go To Special’ dialog box to select visible cells in a dataset. Below I have the same workshop sign-ups with rows 5 to 7 hidden, and I want to select only the visible cells.

Workshop sign-ups with rows 5 to 7 hidden

Here are the steps:

  1. Select the data set in which you want to select the visible cells.
The dataset A1:E13 selected
  1. Go to the Home tab.
Home tab in the Excel ribbon
  1. In the Editing group, click on Find & Select.
Find & Select in the Editing group of the Home tab
  1. Click on Go To Special.
Go To Special option in the Find & Select drop-down
  1. In the ‘Go To Special’ dialog box, select ‘Visible cells only’.
Visible cells only selected in the Go To Special dialog box
  1. Click OK.

This would select all the visible cells in the dataset. You can now copy and paste them, and the hidden rows won’t come along.

Pro Tip: You can also open the Go To dialog box by pressing F5 (or Control + G), and then click the Special button to get to the same ‘Go To Special’ dialog box.

Also read: Select Till End of Data in a Column in Excel (Shortcuts)

Add a Select Visible Cells Button to the Quick Access Toolbar

Another great way to select visible cells in Excel is to add a command to the Quick Access Toolbar (QAT).

Once added, you can simply click this command in the QAT, and it will select visible cells in the dataset. If you don’t see the Quick Access Toolbar above or below the ribbon, right-click anywhere on the ribbon and choose Show Quick Access Toolbar.

Here are the steps to add ‘Select Visible Cells’ command to the QAT:

  1. Click on the Customize Quick Access Toolbar icon.
Customize Quick Access Toolbar icon
  1. Select ‘More Commands’.
More Commands in the Customize Quick Access Toolbar drop-down
  1. In the ‘Excel Options’ dialog box, from the ‘Choose commands from’ drop-down, select ‘All Commands’.
All Commands selected in the Choose commands from drop-down
  1. Scroll down the list and click on ‘Select Visible Cells’ option.
Select Visible Cells selected in the All Commands list
  1. Click on the Add button.
Add button in the Excel Options dialog box
  1. Click OK.

The above steps would add the ‘Select Visible Cells’ command to the QAT.

Select Visible Cells command in the Quick Access Toolbar

Now when you select a dataset and click on this command in the QAT, it will select visible cells only.

Selecting Visible Cells in Filtered Data

When rows are hidden because you applied a filter, Excel already handles this for you. A regular copy and paste of filtered data only copies the visible rows, so you don’t need ALT + ; here.

Below I have the same workshop sign-ups, filtered to show only the people in Denver, and I want to copy just these four rows.

Workshop sign-ups filtered to show only the Denver rows

If I select A1:E13, copy it, and paste it somewhere else, I get only the header and the four Denver sign-ups.

Plain copy and paste of the filtered data gives only the header and the four Denver rows

So the visible-cells trick matters for rows you hide yourself (or collapse in a group), not for filtered rows. Pressing ALT + ; on filtered data won’t hurt though, so if it’s already a habit, keep using it.

Pasting is a different story. If you paste into a filtered column, Excel fills the hidden rows too, and I cover the workarounds in Paste into Filtered Column (Skipping Hidden Cells).

Select Visible Cells in Grouped or Subtotaled Data

A really useful place to select visible cells is when you have grouped data and only want the summary rows. This is common when you use Data > Subtotal, which groups your rows and adds a total row (a SUBTOTAL formula) for each group.

Below I have the workshop fees with a subtotal for each workshop, and I’ve collapsed the groups so only the total rows show. I want to copy just this summary.

Workshop fees with subtotals, collapsed to show only the total rows

If you open the example file, click the outline button 3 (on the left of the row numbers) to see all the detail rows, then click 2 to collapse them back.

If I copy A1:C18 and paste it, Excel brings back all 18 rows, including every detail row hidden inside the groups. Here is how to get only the summary:

  1. Select the collapsed data (A1:C18 in this example).
The collapsed data A1:C18 selected
  1. Press ALT + ; to select only the visible cells.
Only the visible total rows selected
  1. Copy the cells (Control + C), select the destination cell, and paste them (Control + V).
Pasted summary with the four workshop totals and the Grand Total of $1,080

You get a clean six-row summary: the header, the four workshop totals, and the Grand Total of $1,080.

Note that the totals come in as values, not as the SUBTOTAL formulas. That’s usually what you want for a summary, because the formulas would point to detail rows that didn’t come along.

So these are three quick ways you can use to select visible cells only in Excel. I hope you found this Excel tutorial useful.

You May Also Like the Following Excel Tutorials:

Sumit Bansal

Sumit Bansal

13x Microsoft Excel MVP

Hey! I'm Sumit Bansal, founder of trumpexcel.com and a Microsoft Excel MVP. I started this site in 2013 because I genuinely love Microsoft Excel (yes, really!) and wanted to share that passion through easy Excel tutorials, tips, and Excel training videos. My goal is straightforward: help you master Excel skills so you can work smarter, boost productivity, and maybe even enjoy spreadsheets along the way!

8 thoughts on “How to Select Only Visible Cells in Excel (3 Quick Ways)”

  1. Where do I find this option in the browser version of Excel 365? Cntrl + G does not work and it is not listed in the Go to menu under Find & Select.

    Reply
  2. Hi, the windows command works perfect for me; e.g. I can select all filtered cells of a column and press alt+; and it selects only that column.Mac however selects all the visible cells, I know the commands Cmnd+shift+* as well as Cmnd+shift+* do the same ( select all visible). My question; do you know the shortcut to select only the column or row( only the cells you want to select)?
    Thank you for sharing your knowledge!

    Reply
  3. Hi, Sumit.
    It will be very interesting if you show what happens when you are trying to copy filtered rows: I thing there is not need to select visible cells. Please correct me case I am wrong.
    Best regards,
    Carlos M.

    Reply

Leave a Comment

Get the FREE 51 Excel Tips Ebook

Enter your details and the free PDF is on its way to your inbox.

Hmm, that didn't go through. Please check your email and try again.

No spam. You'll also get my weekly Excel newsletter. Unsubscribe anytime.

Check your inbox!

The ebook is on its way to your email. It usually lands within a couple of minutes.