+ Reply to Thread
Results 1 to 4 of 4

Mark every nth row

  1. #1
    Forum Contributor
    Join Date
    10-30-2008
    Location
    Los Angeles
    Posts
    144

    Mark every nth row

    Hi all:

    I searched but couldn't find anything quite matching this. I have data in columns A through E down to row 25000. I want to put the number 1 in column F for every nth (in this case fifth row). Attached is a small sample. Any help is appreciated.

    Max
    Attached Files Attached Files
    Last edited by maxthebear; 02-23-2009 at 08:43 PM.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Mark every nth row

    Using your posted workbook....try this:

    H1: RowTest....(or blank or anything that's not a col heading)
    H2: =MOD(ROW(E2),5)=0
    Note: that formula refers to the first row under the headings

    Next...from the Excel Main Menu:
    Data.Filter.Advanced_Filter
    ...List Range: (select your data....currently A1:E459)
    ...Criteria Range: $H$1:$H$2
    ...Click: OK

    Now only every 5th row under the headings will be displayed (5, 10, 15, etc)
    • Select from F5:F455
    • Type: 1.....Hold down CTRL and Press ENTER
    (That will enter a 1 in each visible cell in the selection
    Last....Data.Filter.Show_All

    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Mark every nth row

    Here's an example using VBA
    Click the button and enter How Many nth rows, it will only enter numbers as far down as you have data.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    10-30-2008
    Location
    Los Angeles
    Posts
    144

    Re: Mark every nth row

    It works. thanks guys. I'll mark it as solved and give you guys ratings................

    Max

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1