Selecting only visible cells in Excel lets you copy, format, or delete data from filtered rows or hidden columns without affecting the hidden data. The quickest way is to select your data range, press Alt + ; (Windows) or Cmd + Shift + Z (Mac), and then copy or edit as needed. This command tells Excel to ignore hidden rows and columns, so only what you can see is included in the selection.
You'll need a worksheet that already has hidden rows or columns, or a filter applied. The command works on any selection, from a single cell to an entire worksheet. It doesn't matter if the hidden data is from filtering, manually hiding rows, or grouping—the shortcut treats all hidden cells the same.
What You'll Need
- A computer with Microsoft Excel installed (any recent version, Windows or Mac).
- A worksheet that contains hidden rows, hidden columns, or an active filter (AutoFilter or a table with filters).
- Basic familiarity with selecting cells and using keyboard shortcuts.
Step-by-Step
- Apply your filter or hide rows/columns first. For example, select your data range, go to the Data tab, and click Filter. Then use the dropdown arrows to filter out rows you don't want. Or right-click a row number and choose Hide to hide that row manually.
- Select the entire data range you want to work with. Click and drag across the cells, or click the top-left cell and press Ctrl + Shift + End (Windows) or Cmd + Shift + Down Arrow then Cmd + Shift + Right Arrow (Mac) to extend the selection to the last used cell. If you want to select the entire worksheet, click the triangle at the intersection of the row numbers and column letters (top-left corner).
- Press the shortcut to select only visible cells. On Windows, press Alt + ; (semicolon). On Mac, press Cmd + Shift + Z. You won't see an immediate change in the selection outline, but Excel is now ignoring hidden cells.
- Verify the selection. Look at the status bar at the bottom of the Excel window. It shows something like "Count: 5" or "Sum: 123". If the count is lower than the total number of cells you initially selected, hidden cells are being excluded. You can also press Ctrl + G (or Cmd + G on Mac) to open the Go To dialog, click Special, choose Visible cells only, and click OK—this does the same thing as the shortcut.
- Copy or edit the visible cells. Now press Ctrl + C (or Cmd + C) to copy the visible cells, or Ctrl + V to paste them elsewhere. If you paste into a new location, only the visible cells are pasted, skipping hidden ones. You can also delete, format, or fill the visible cells without affecting hidden data.
- Clear the filter or unhide rows when done. To show all data again, go to the Data tab and click Clear (the funnel icon with an eraser), or right-click a hidden row number and choose Unhide.
Common Mistakes
- Forgetting to press the shortcut before copying. If you copy a filtered range without pressing Alt + ;, Excel copies both visible and hidden rows. The shortcut must be pressed before you copy.
- Using the shortcut on a selection that has no hidden cells. The command does nothing if everything is visible. Make sure you actually have hidden rows or columns, or an active filter.
- Selecting only a few cells instead of the whole range. If you select only the visible cells you see, you might miss hidden cells that are part of the data. Always select the entire range (including hidden rows) before pressing the shortcut.
- Confusing the shortcut with 'Go To Special' on Mac. On Mac, the shortcut is Cmd + Shift + Z, not Alt + ;. Using Alt + ; on a Mac may type a semicolon instead.
- Pasting into a filtered list incorrectly. If you paste visible cells into a filtered column, Excel may paste into hidden rows too. Always paste into a new location or ensure the destination is also filtered the same way.
Tips
- Use the Ribbon command if you forget the shortcut. Go to the Home tab, click Find & Select (in the Editing group), and choose Go To Special. Then select Visible cells only and click OK.
- Add the command to the Quick Access Toolbar. Right-click the Go To Special option (or the shortcut) and choose Add to Quick Access Toolbar. Then you can click it with one click.
- Use it with filtered tables. When you filter a table (Insert > Table), the shortcut works the same. It's especially useful for copying filtered rows to another sheet.
- Combine with 'Paste Special' for values. After selecting visible cells, copy and then use Paste Special > Values to paste only the data, not formulas.
- For large datasets, use the shortcut on the entire column. If you have a header row, select the whole column (click the column letter) and press Alt + ;. This selects all visible cells in that column, ignoring hidden rows.
Troubleshooting
If the shortcut doesn't seem to work:
- Check that you pressed the correct keys. On Windows, it's Alt (hold) + semicolon (;). On Mac, it's Cmd + Shift + Z. Make sure you don't have Caps Lock or Num Lock interfering.
- Verify that there are actually hidden cells in your selection. If you filtered data, the row numbers should be blue and some numbers may be missing. If you hid rows manually, you'll see a gap in the row numbers.
- Try using the Ribbon method: Home > Find & Select > Go To Special > Visible cells only. If that works, the shortcut might be disabled or remapped in your Excel settings.
If copying still includes hidden rows:
- You likely copied before pressing the shortcut. Undo the copy (Ctrl + Z), select the range again, press Alt + ;, then copy.
- Check if you have hidden columns as well. The shortcut selects visible cells in both hidden rows and hidden columns. If you only wanted to exclude hidden rows, you might need to unhide columns first.
If the selection becomes a weird shape:
- This is normal. When you select visible cells in a non-contiguous range (e.g., after filtering), the selection may appear as multiple blocks. That's fine—copy and paste will still work.
Frequently Asked Questions
Does Alt + ; work in all versions of Excel?
Yes, Alt + ; has been a standard shortcut in Excel for Windows for many versions, including Excel 2010, 2013, 2016, 2019, and Microsoft 365. On Mac, the shortcut is Cmd + Shift + Z in recent versions, but older versions might use Ctrl + Shift + Z or a different combination.
Can I use this to copy filtered rows to another sheet?
Yes. Select the filtered range, press Alt + ;, copy, then go to the destination sheet and paste. Only the visible (filtered) rows will be pasted.
What if I want to select visible cells in a single column?
Click the column letter to select the entire column, then press Alt + ;. This selects all visible cells in that column, ignoring hidden rows. If the column has a header, you might want to exclude it by starting your selection from the first data cell.
Does this work with grouped rows (outline groups)?
Yes. Grouped rows that are collapsed are considered hidden, so the shortcut will exclude them. Expand the group first if you want to include those rows.
Can I use the shortcut to delete visible rows without affecting hidden ones?
Yes. After selecting visible cells, press Ctrl + - (minus) to delete the rows. Excel will delete only the visible rows, leaving hidden rows intact. Be careful: this permanently deletes data, so make sure you have a backup.
Why does my selection still show hidden rows when I paste?
If you paste into a range that has hidden rows, Excel may paste into those hidden rows as well. Always paste into a new location or ensure the destination has no hidden rows. Alternatively, use Paste Special > Values to paste only the data.