How to Filter Every Alternate Row in Excel Using Formulas

📅 Apr 23, 2026 📝 Sarah Miller

Managing voluminous financial spreadsheets often leads to analysis fatigue, especially when trying to manually isolate specific data subsets for auditing. While tracking standard funding sources like venture capital is a common starting point, analyzing federal grants provides a distinct advantage, as grants offer non-dilutive capital that preserves equity. However, a critical stipulation of managing this data is the need for precise filtering; for example, isolating alternate rows to compare bi-annual SBIR grant distributions. Below, we outline the exact Excel formula-combining FILTER, MOD, and ROW-to automate this alternate-row extraction process efficiently.

How to Filter Every Alternate Row in Excel Using Formulas

In data analysis, we often encounter datasets that require structured cleanup. A common challenge is dealing with system-generated reports where data is spread across alternating rows-for instance, where transaction details sit on odd-numbered rows while descriptions, metadata, or tax values occupy even-numbered rows. Alternatively, you might simply want to downsample a massive dataset by extracting every second, third, or N-th row.

Historically, filtering alternate rows required tedious manual selection, helper columns, or custom VBA macros. However, with modern Excel's dynamic array formulas, you can easily filter and extract alternating rows using a single, elegant formula. In this comprehensive guide, we will explore several powerful techniques to filter alternate rows in Excel, ranging from modern dynamic array formulas to classic methods compatible with older Excel versions.

Understanding the Core Logic: The MOD and ROW Functions

Before diving into the formulas, it is important to understand the math that makes this filtration possible. The magic lies in combining two simple Excel functions: ROW and MOD.

  • ROW(): Returns the row number of a given cell reference. For example, =ROW(A5) returns 5.
  • MOD(number, divisor): Returns the remainder after a number is divided by a divisor. For example, =MOD(5, 2) returns 1 (because 5 divided by 2 is 2 with a remainder of 1).

By combining these two, we can test whether a row is odd or even. The formula =MOD(ROW(), 2) will return 0 for all even rows and 1 for all odd rows. This binary output acts as a perfect switch for filtering alternating records.

Method 1: The Modern Dynamic Array Formula (Excel 365 & 2021)

If you are using Microsoft 365 or Excel 2021, you have access to Dynamic Arrays. The FILTER function is the most efficient way to extract alternate rows automatically without modifying your source data.

Formula for Even Rows (Row 2, 4, 6, etc.)

To extract every even row from a dataset spanning A2:C20, use the following formula:

=FILTER(A2:C20, MOD(ROW(A2:C20)-ROW(A2), 2) = 0)

Formula for Odd Rows (Row 1, 3, 5, etc.)

To extract every odd row from the same dataset, change the criteria evaluation to 1:

=FILTER(A2:C20, MOD(ROW(A2:C20)-ROW(A2), 2) = 1)

Why Subtract ROW(A2)?

You might wonder why we use ROW(A2:C20)-ROW(A2) instead of just ROW(A2:C20). Subtracting the starting row number standardizes the index so that the first row of your selected dataset always acts as "0" (even), the second as "1" (odd), and so on. This prevents your filter from breaking if you insert or delete rows above your dataset.

How the Formula Works Step-by-Step:

  1. ROW(A2:C20) generates an array of actual worksheet row numbers: {2; 3; 4; 5; 6; ...; 20}.
  2. Subtracting ROW(A2) (which evaluates to 2) shifts this array to start at zero: {0; 1; 2; 3; 4; ...; 18}.
  3. The MOD function divides each number in this sequence by 2 and outputs the remainders: {0; 1; 0; 1; 0; ...; 0}.
  4. The logical operator checks if the remainder equals 0 (for even intervals) or 1 (for odd intervals), returning an array of TRUE and FALSE values.
  5. Finally, the FILTER function consumes this boolean array and displays only the rows corresponding to TRUE.

Method 2: Generalizing to Every N-th Row

The beauty of the MOD logic is that it can easily scale. If you want to extract every 3rd, 5th, or 10th row, you only need to change the divisor in the MOD function.

For example, to extract every 3rd row from a dataset in A2:C20, use this formula:

=FILTER(A2:C20, MOD(ROW(A2:C20)-ROW(A2), 3) = 0)

By changing the final comparator, you can choose which of the three rows to extract:

  • Use = 0 to extract the 1st, 4th, 7th, etc. rows (index 0, 3, 6).
  • Use = 1 to extract the 2nd, 5th, 8th, etc. rows (index 1, 4, 7).
  • Use = 2 to extract the 3rd, 6th, 9th, etc. rows (index 2, 5, 8).

Method 3: Classic Helper Column Method (Excel 2019 and Older)

If you are sharing your workbook with colleagues using older versions of Excel that do not support dynamic array formulas like FILTER, you can achieve the exact same results using a helper column combined with Excel's native Autofilter tool.

Step-by-Step Instructions:

  1. Insert a new column next to your dataset. Let's call it "Filter Key" in column D.
  2. In cell D2 (assuming your data starts in row 2), enter the following formula:
    =MOD(ROW()-ROW($D$2), 2)
  3. Drag the fill handle down to copy the formula to the bottom of your dataset. Column D will now show alternating 0 and 1 values.
  4. Select your entire dataset, including the helper column headers.
  5. Go to the Data tab on the Ribbon and click the Filter button (or press Ctrl + Shift + L).
  6. Click the drop-down arrow in the "Filter Key" header.
  7. Check 0 to display only even rows, or check 1 to display only odd rows, then click OK.

Once filtered, you can safely copy the visible rows to another sheet, or perform bulk formatting modifications on the filtered selection.

Method 4: Using Power Query for Repeating Row Patterns

If your dataset is massive (tens of thousands of rows) or is updated regularly via external data connections, Power Query is the most robust tool for the job. It handles alternating row extraction seamlessly without slowing down your workbook calculations.

Step-by-Step Power Query Process:

  1. Select any cell within your dataset.
  2. Go to the Data tab and click From Table/Range. This opens the Power Query Editor.
  3. Go to the Add Column tab on the Power Query ribbon.
  4. Click the drop-down next to Index Column and select From 0.
  5. With the new Index column selected, go to the Add Column tab and click Standard > Modulo.
  6. In the Modulo window, enter 2 as the value and click OK. This creates a new column containing alternating 0s and 1s.
  7. Click the filter drop-down on the new "Modulo" column, check only 0 (for even rows) or 1 (for odd rows), and click OK.
  8. Right-click the Index and Modulo columns and select Remove to clean up your table.
  9. Go to the Home tab and click Close & Load to return your cleaned, filtered dataset back to Excel as a new sheet.

Summary Comparison of Methods

Depending on your version of Excel and your specific workbook requirements, here is a quick reference guide on which method to choose:

Method Excel Compatibility Pros Cons
FILTER & MOD Formula Office 365 / Excel 2021+ Fully dynamic; updates automatically when raw data changes; no manual steps. Not backward compatible with older Excel versions.
Helper Column & Autofilter All Versions Extremely simple; works on legacy systems; very easy to understand. Requires manual updating if new rows are added; clutters the sheet with helper columns.
Power Query Excel 2010 and Newer Highly scalable; perfect for large datasets; can be automated for repeating imports. Requires manual "Refresh" button click to update when source data changes.

Conclusion

Filtering alternating rows is a vital data-wrangling skill. If you are running the modern version of Microsoft Office, utilizing the dynamic FILTER array combined with MOD and ROW functions will save you valuable time and keep your worksheets clean and responsive. For legacy support or massive corporate databases, utilizing Helper Columns or Power Query provides reliable, structurally sound alternatives. Choose the method that best aligns with your environment, and transform unstructured data formats into tidy, analyzed datasets with ease.

Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.