Inside The Web
    Facebook Twitter Instagram
    Inside The Web
    • Office
      • Excel
      • Ms Word
      • OneDrive
      • Google Docs
      • Google Sheets
      • Google Drive
    • Email
      • Gmail
      • Outlook
      • Emal Etiquette
    • Office Etiquette
    • Productivity
    Inside The Web
    Home»Office»Excel»How to Select Every Other Row in Excel

    How to Select Every Other Row in Excel

    Jabin ManandharBy Jabin ManandharApril 25, 2023 Excel 5 Mins Read

    Selecting adjacent rows is easy with keyboard shortcuts Shift + → or Shift + Ctrl + → but choosing alternate rows or rows at regular intervals (such as selecting odd or even rows or every nth row) can be more complex.

    If your dataset is small, you can manually select the non-adjacent rows by pressing the Ctrl key while clicking the row number in the leftmost column.

    But this isn’t feasible when dealing with large datasets. Also, there is a slight chance that you might miss some rows.

    Fortunately, there are various workarounds to significantly speed up this process, which includes using table format and VBA code. 

    Using VBA

    This is perhaps the most efficient and quickest way to select rows. And, it works even if you have a large dataset with thousands of rows/records

    By running the VBA code, you can automatically select every second, third, or any nth row. 

    1. Select all the rows.
      Select-rows
    2. Right-click on the worksheet and select View code.
      View-code-VBA
    3. Paste the following VBA code in the new window.
      Paste-VBA-code-into-the-new-window
    Sub SelectEveryNthRow()
    Dim RowRange As Range
    Dim RowSelect As Range
    Dim rowNumber As Integer
    
    rowNumber = 3 'Replace 3 with every nth row you want to select
    
    Set RowRange = Selection
    Set RowSelect = RowRange.Rows(rowNumber)
    
    For i = rowNumber To RowRange.Rows.Count Step rowNumber
    Set RowSelect = Union(RowSelect, RowRange.Rows(i))
    Next i
    
    Application.Goto RowSelect
    
    End Sub
    1. Press F5 or click the Run icon.
      Run-VBA-code
    Note: Replace 3 in rowNumber=3 with any number you want to select for the nth row.

    Using Table Format

    This method is particularly useful if you want to select every odd/even row. Here, we take the advantage of the fact that a table design applies two different colors on alternate banded rows.

    1. Select all the cells containing the required data.
    2. Press Ctrl + T to convert them into a table format. Enable the My table has headers if your data already contains a header.
      Convert-into-table
    3. Make sure you use a table design that has banded rows with alternate colors. Otherwise, choose the appropriate one in the Table Styles section under the Table Design tab.
    4. Now, select the Table Design tab and click Convert to Range inside the Tools section and click Yes on the next prompt.
      Convert-to-range
    5. Then, under the Data tab, select Filter.
      Select-Filter-under-the-Data-tab
    6. Click the dropdown arrow next to one of the headers.
    7. Select Filter by color and choose a row color or No fill to filter out the alternate cells.
      Sort by color
    8. Now, choose the odd/even cells based on which color appears on banded rows of the table.
    Note: You can later unhide the remaining cells by clicking the Filter button again under the Data tab.

    Using the SEQUENCE Function

    The SEQUENCE function generates a list of sequential numbers like 1,2,3,4…., which we can use as a flag to filter out every alternating row at the nth position. Then, we just need to select them.

    Syntax:
    =SEQUENCE(rows, columns, start, step)

    Where,

    • Rows: Number of rows on which you want to generate a sequential list of numbers (1,2,3,…)
    • Columns: Number of columns you want to include while generating the list (since we don’t need it for this particular case, we can skip it.)
    • Start: starting number of the sequence list
    • Step: number by which the next number is incremented

    Alternatively, you can highlight alternate rows using conditional formatting. Then, you can filter and select them using Step 2.

    Step 1: Generate the Numbers 

    1. Select a cell that’s part of the dataset. Then, use the shortcut Ctrl + Shift + Space to select all the adjacent rows of the dataset.
    2. Create a helper column next to your last column. Here, we are using the “Flag” column.
    3. Under the new column, enter the following formula.
      =SEQUENCE(3,,1,1)
      Enter-SEQUENCE-formula-under-helper-column
    1. Select the generated values and drag down the fill handle until the last row.
      Drag the handle to fill other rows with numbers
    Note: We entered 3 in the above formula to generate three values and later filter out every row at 3rd position. However, if you want to select every row at position 5, replace it with 5, and so on.

    Step 2: Use the Filter Option to Select Rows

    1. Now, select the helper column header.
    2. Then, click Filter under the Data tab. You can find it inside Sort & Filter section.
      Filter
    3. Click the dropdown icon next to the header and unselect the Select All checkbox.
      Uncheck Select All
    4. Now, only enable the checkbox of the number you want to filter. To select every 3rd row, select only the checkbox next to 3 and click OK.
      Select-every-third-row-in-the-dataset
    5. Now, select the filtered rows.
      Select-every-other-third-row
    Note: To delete the alternate rows, right-click and select the Delete row option.

    Using the Go to Tool

    This method is specifically applicable if your dataset contains empty rows recurring at a specific position. 

    1. Select all the cells (s) containing the dataset.
    2. Press Ctrl + G.
    3. On the next prompt, click the Special button.
      Click-Special-button
    4. Then, choose the Blanks option.
      Choose-Blanks
    5. Once all the alternating blank rows are selected, right-click and select the Delete > Entire  Row option.
      Select and remove alternate blank rows

    Related Questions

    How to Select Every Other Column in Excel?

    Selecting alternate columns is similar to selecting rows. 

    1. First, select the rows in your dataset and copy (Ctrl + C) them. 
    2. Select a cell where you want to paste them and press Ctrl + Alt + V and E. Alternatively, right-click and select Transpose under the Paste options.
      Transpose-column-and-row
    3. Use one of the methods to select alternating rows and transpose them.
    Excel Basics
    Jabin Manandhar

      As a tech content writer, Jabin covers Excel-related articles at InsideTheWeb. His articles mainly involve helping new users to quickly familiarize themselves with the Excel interface and explaining various essential features. While he got introduced to Excel in his early school days, he developed a keen interest in it after working on a college project. He was impressed at how quickly one could accomplish several tasks with built-in functions like the filter function and user-friendly tools like the power query. Keeping beginner audiences in mind, he loves to explain even the most fundamental Excel concepts in detail and break down complex topics with a step-by-step approach. As an avid Excel user, he believes every task can be done a lot quicker if you know the right tools and techniques. When he’s not behind a keyboard, he loves to listen to interesting audiobooks and podcasts.

      Related Posts

      Excel By Nisha Gurung

      How to Compare Two Columns in Excel Using VLOOKUP

      Excel By Nisha Gurung

      How to Share Excel Files with Multiple Users

      Excel By Nisha Gurung

      How to Filter Based on a List in Excel

      Add A Comment
      Table of ContentsToggle Table of ContentToggle
      • Using VBA
      • Using Table Format
      • Using the SEQUENCE Function
        • Step 1: Generate the Numbers 
        • Step 2: Use the Filter Option to Select Rows
      • Using the Go to Tool
      • Related Questions
        • How to Select Every Other Column in Excel?
      • Home
      • About Us
      • Privacy Policy
      © 2025 Inside The Web

      Type above and press Enter to search. Press Esc to cancel.