Formula Errors

How to Fill Formulas Down Filtered Excel Rows Using Visible Row Order

Elise WilliamsElise Williams Oct 23, 2026 870 views

Question details

The user needs to drag a formula down a filtered worksheet where the cell references increment based on visible row order rather than physical row numbers.

How to Fill Formulas Down Filtered Excel Rows Using Visible Row Order
Product
Excel
Device & OS
not provided
Scenario
Filling formulas down a filtered list where sequential mapping to another worksheet is required.
Observed behavior
Excel natively increments cell references by physical row numbers, ignoring the active filter, which disrupts the sequential referencing of the target data.
Before you start

Ensure that your filtered dataset has at least one column containing no blank cells, as this column will serve as a continuous key for dynamically counting visible rows.

Solution 1Recommended

Use INDEX and SUBTOTAL to Reference Sequential Rows

By combining the INDEX and SUBTOTAL functions, you can dynamically count only the visible rows and use that count as a sequential row index.

The SUBTOTAL function, when used with function_num 103, counts non-empty cells in visible rows only. We can use this dynamic count as the row number argument for the INDEX function to sequentially reference cells on another sheet without skipping hidden rows.

1
Identify a key reference column

Choose a column (for example, Column A) in your currently filtered worksheet that has a solid, non-blank value in every visible row.

2
Enter the INDEX and SUBTOTAL formula

In the first visible row of your target cell, enter the formula: =INDEX(SheetB!B:B, SUBTOTAL(103, $A$2:A2)). Replace SheetB!B:B with the data column you want to pull from, and $A$2:A2 with the starting cell of your key reference column.

3
Fill the formula down the column

Select the cell containing your new formula, click the fill handle at the bottom-right corner of the cell, and drag it down through the remaining visible rows.

Use INDEX and SUBTOTAL to Reference Sequential Rows
Understanding the Mixed Reference: Notice the cell reference $A$2:A2. The first part is an absolute reference (locked to the starting row), and the second part is relative. As you drag the formula down, this expanding range continuously counts all visible rows up to the current row.
Advanced Formula Support in WPS

Use WPS Spreadsheet to Handle Complex Arrays and Filtered Formulas

WPS Spreadsheet fully supports advanced functions like SUBTOTAL and INDEX, making it easy to manage filtered datasets. You can perform complex data calculations and sequentially fill formulas across visible rows flawlessly.

  1. 1. Open your dataset in WPS Spreadsheet: Launch WPS Office and open your filtered workbook to the desired sheet.
  2. 2. Apply the custom formula: Type the =INDEX(SheetB!B:B, SUBTOTAL(103, $A$2:A2)) formula in the first visible row.
  3. 3. Drag to fill the visible rows: Drag the fill handle down to apply the formula specifically to the visible filtered rows; WPS Spreadsheet will correctly calculate the sequential values.
Fully compatible with Microsoft Excel formulas and functionsAdvanced filtering and sorting capabilities for large datasetsLightweight application with high processing speed without laggingFree to download and use for daily office tasks
microsoft office alternative - wps office

Frequently Asked Questions

Why does standard dragging skip visible rows?

When you drag a standard formula down in a spreadsheet, it automatically increments the physical row numbers (e.g., A2, A3, A4). It does not account for the rows hidden by your filter, resulting in skipped references when pulling sequential data.

What does the 103 stand for in the SUBTOTAL function?

The number 103 tells the SUBTOTAL function to perform a COUNTA operation (counting non-blank cells) while strictly ignoring any hidden rows. This ensures that only the data currently visible on your screen is counted.

Can I use this method if my reference column has blanks?

No, the SUBTOTAL(103, ...) method requires a key column with consistently populated, non-blank data. If there are blanks in the expanding range, the dynamic count will be inaccurate, and the INDEX formula will pull the wrong sequential data.

Does this work if rows are manually hidden instead of filtered?

Yes, using the 103 parameter in the SUBTOTAL function ignores both filtered-out rows and manually hidden rows, guaranteeing that only the cells you can actually see are factored into the formula.