Excel: How to Paste Only Into Visible Rows

How-to basics · Updated November 19, 2026

To enter the same value in filtered rows without changing hidden rows, select the destination cells, choose Home > Find & Select > Go To Special > Visible cells only, type the value, and press Ctrl+Enter. For a list of different values, Excel’s visible-cell selection does not always make a normal multi-cell paste map safely to the visible rows; use a row-by-row method, such as the macro below, or match the data by a unique ID.

Why hidden rows make pasting tricky

Filtering hides rows from view, but it does not remove them from the worksheet. A range that looks like a short, continuous list may contain hidden cells between the records you can see. If you paste a block into that range, Excel may treat the destination as a continuous range and put values in rows that are currently hidden. Those changes can be hard to notice until you clear the filter.

The key distinction is between selecting visible cells and pasting into a filtered range. Excel’s Visible cells only command is useful for restricting a selection to cells you can see. It is dependable for copying visible source cells and for entering one repeated value into selected visible destination cells. It does not mean that every block copied from elsewhere will automatically distribute one item per visible destination row.

These instructions are for Excel for Microsoft 365 on Windows. They apply whether rows are hidden by a filter or hidden manually, although a filter is the most common reason the issue arises.

Select visible cells only

Use this procedure to limit a selection to visible cells before you copy or fill them:

  1. Apply the filter you need. If you are working with an Excel table, use its header filter; for a regular range, use Data > Filter.
  2. Select only the cells you intend to work with, excluding the header row. For example, select the cells in the Status column for the records, including the rows that the filter currently hides.
  3. Choose Home > Find & Select > Go To Special.
  4. Select Visible cells only, then choose OK. The selection may show extra outlines or separate areas; that is normal.
  5. Copy with Ctrl+C, or enter a value if that is your goal.

On Windows, Alt+; is the shortcut for selecting visible cells only after you have selected the range. On a Mac, use Home > Find & Select > Go To Special and select Visible cells only; keyboard shortcuts can vary with the keyboard layout and Excel version. Excel for the web has fewer desktop selection options, so use the desktop app for workflows that depend on Go To Special.

Enter one value into visible rows

When every visible record should receive the same entry, you can fill the visible cells directly. For instance, suppose a filter shows 12 open orders and you want to mark each one as “Reviewed,” while leaving closed orders untouched.

  1. Select the destination cells for all the records, including the rows hidden by the filter.
  2. Choose Visible cells only using Go To Special or press Alt+; on Windows.
  3. Type Reviewed. Do not click another cell or remove the selection.
  4. Press Ctrl+Enter. Excel enters the same value in each selected visible cell.

Check the result before clearing the filter: the visible records should show the new entry. Then clear the filter and confirm that hidden records still have their previous values. If you want to fill a formula rather than text, first consider whether the formula’s references should change from row to row. A repeated value is straightforward; formulas across a non-contiguous selection deserve a quick check because reference behavior matters.

Paste different values into filtered rows

A common task is to paste a list of different values, in order, into the visible rows—for example, assigning 12 separate notes to 12 filtered orders. Selecting visible destination cells first is not a universal fix for this. Excel can reject a paste into a multi-area selection, or a paste operation can fail to align the source items with the visible rows as intended. Do not assume that a filtered view behaves like a new compact worksheet.

For a short list, the safest manual option is to work through the visible destination cells one at a time, confirming each record as you go. For a larger list, use a method that explicitly connects each value to its destination:

  • Match by a unique ID. If each order, employee, or product has a unique identifier, arrange the incoming data with that ID and use a lookup-based workflow to place the right value with the right record. This is safer than relying on row order, especially if the filter or sort order may change.
  • Prepare a full-height staging range. Lay out the incoming values in the same worksheet rows as their intended records, leaving the positions for hidden rows blank. You can then paste the aligned range and use Paste Special’s Skip blanks option so blank staging cells do not replace existing values. Check the alignment carefully: the blanks must correspond exactly to rows you want left unchanged.
  • Use a macro that writes to visible rows only. For a repeat task, a small VBA procedure can loop through the destination rows and skip any hidden row. The example below writes values in order and checks that the source count matches the number of visible destination rows.

If the records have no stable ID and their visible order is the intended mapping, make sure both lists are sorted in the same order before transferring data. A list that is off by one row can assign plausible-looking values to the wrong records without producing an obvious error.

Use VBA for an ordered list of values

The following macro is for a contiguous, single-column source list and a single-column destination range. Select the destination range so it includes the filtered-out rows as well as the visible ones; the code counts and writes only to rows that are not hidden. It copies cell values, not formatting or formulas, and the source list must contain exactly as many cells as there are visible destination rows.

Sub PasteValuesToVisibleRows()
    Dim sourceRange As Range
    Dim targetRange As Range
    Dim sourceCell As Range
    Dim targetCell As Range
    Dim sourceIndex As Long
    Dim visibleCount As Long

    On Error GoTo Cancelled
    Set sourceRange = Application.InputBox( _
        "Select the one-column source list", Type:=8)
    Set targetRange = Application.InputBox( _
        "Select the one-column destination range", Type:=8)
    On Error GoTo 0

    If sourceRange.Columns.Count <> 1 Or _
       targetRange.Columns.Count <> 1 Then
        MsgBox "Select one column for both ranges."
        Exit Sub
    End If

    For Each targetCell In targetRange.Cells
        If Not targetCell.EntireRow.Hidden Then
            visibleCount = visibleCount + 1
        End If
    Next targetCell

    If sourceRange.Cells.Count <> visibleCount Then
        MsgBox "The source count must match the visible row count."
        Exit Sub
    End If

    sourceIndex = 1
    For Each targetCell In targetRange.Cells
        If Not targetCell.EntireRow.Hidden Then
            targetCell.Value = sourceRange.Cells(sourceIndex).Value
            sourceIndex = sourceIndex + 1
        End If
    Next targetCell
    Exit Sub

Cancelled:
    MsgBox "The operation was cancelled or a range was not selected."
End Sub

To use it, press Alt+F11 on Windows, insert a standard module, and paste in the code. Run the macro and select the source and destination ranges when prompted. Save a copy of the workbook before running a macro: VBA changes cannot be undone with Ctrl+Z. If you do not use macros, use the ID-matching or carefully aligned staging approach instead.

Check the result and avoid common mistakes

Before removing a filter, verify a few changed records and at least one hidden record. Filtering is only a view; hidden rows are still part of the data. Checking both groups helps catch accidental overwrites while the filtered view is still available for comparison.

  • Do not include the header. Selecting a table header along with the records can cause an unintended edit or interfere with the filter controls.
  • Do not confuse copying with destination mapping. Copying visible cells is not proof that a separate paste will land only in visible destination rows.
  • Check the visible count. When assigning distinct values, confirm that the number of source items equals the number of intended destination records.
  • Watch for other hidden rows. Manually hidden rows, grouped rows, or a changed filter can alter which records are visible. Review the destination selection before filling it.
  • Keep a recoverable copy. Saving before a large paste or macro gives you a way back if the wrong range was selected.

For a one-time edit to a small filtered list, a repeated entry with Visible cells only is usually simplest. For distinct information, matching by a unique identifier is generally more reliable than pasting by position. The best method depends on whether the incoming data is one repeated value or a separate value for each record.

Frequently Asked Questions

Does Alt+; stop Excel from pasting into hidden rows?
On Windows, Alt+; selects visible cells only within the current selection. It is useful for copying visible cells or filling visible destinations with one repeated entry. It does not guarantee that a multi-cell paste from a separate list will map correctly to filtered rows.

Can I paste different values into filtered rows without a macro?
Yes, but take care with alignment. For dependable results, match incoming values to records by a unique ID, or prepare a staging range aligned to the worksheet rows and use Paste Special with Skip blanks where appropriate. For only a few records, entering values individually is another option.

Will this work with rows hidden manually?
Yes. Go To Special’s Visible cells only selection excludes hidden cells, and the macro checks whether each entire row is hidden. If a row is hidden manually rather than by a filter, it is still excluded until it is shown again.

Why does Excel say I cannot use that command on multiple selections?
Visible cells in a filtered range can form several separate areas rather than one continuous block. Some paste operations do not accept that kind of destination selection. Use a repeated-value fill, a row-by-row approach, an aligned staging range, or the macro rather than forcing a block paste.

Does this work in Excel for the web or on Mac?
The article’s steps target Microsoft 365 on Windows. Excel for Mac has Go To Special, though its keyboard shortcuts differ; use the menu path if unsure. Excel for the web may not provide the same desktop selection workflow, so open the workbook in the desktop app when you need to select visible cells only.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.