Closed Thread
Results 1 to 5 of 5

Select every 4th row in Excel

  1. #1
    Registered User
    Join Date
    12-06-2018
    Location
    Norway
    MS-Off Ver
    1811
    Posts
    31

    Select every 4th row in Excel

    Hello,

    I've attached a sample of the data I'm working with.

    As you can see, I've time stamps in column A taken every 80 seconds. I would like to transform my data so that I'm only left with the rows having "00" seconds in column A (I'm using the time format mm/dd/yyyy hh:mm:ss): This basically means selecting every 4th row.

    I would appreciate help as other questions that have been posted on this matter are not clear.

    Any input is appreciated!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Select every 4th row in Excel

    use a helper column eg column P

    Formula: =IF(SECOND(A1)=0,1,"")

    Fill down and every 4th row will return 1.


    Select the home tab and then select Special

    select formula and then number every 4th cell will be selected.

    As a Macro

    Please Login or Register  to view this content.

    However this is probably what you are after:-

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 04-06-2019 at 08:05 AM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    06-04-2018
    Location
    Europe
    MS-Off Ver
    Office365
    Posts
    78

    Re: Select every 4th row in Excel

    Hi,

    With your data, in Conditional Formatting, select data then use formula:

    =MOD(ROW()-1,3)=1

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,604

    Re: Select every 4th row in Excel

    It's actually every third row that you want to pick up.

    You can use column Q as a helper column, by putting this formula in Q2:

    =INT((ROWS($1:1)-1)/3)+1

    and this one in Q3:

    =IF(INT((ROWS($1:2)-1)/3)+1=LOOKUP(9999,Q$2:Q2),"",INT((ROWS($1:2)-1)/3)+1)

    Copy Q3 down to the bottom of your data.

    Copy your headings from A1:O1 across to S1, then you can use this formula in S2:

    =IFERROR(INDEX(A:A,MATCH(ROWS($1:1),$Q:$Q,0)),"")

    which can be copied across to AG2. Use the Format Painter to copy the formats from A2:O2 across into S2:AG2, and then you can copy S2:AG2 down until you start to get blanks.

    The attached file shows this in operation.

    You could, of course, put the reduced data set in a different sheet.

    Hope this helps.

    Pete
    Attached Files Attached Files

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,406

    Re: Select every 4th row in Excel

    Administrative Note:

    Unfortunately, this is a duplicate thread, and you are allowed only ONE thread per issue here. I am, therefore, closing this thread, but you may continue here in the original thread: https://www.excelforum.com/excel-gen...-interval.html
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 11
    Last Post: 11-03-2017, 05:11 AM
  2. Replies: 1
    Last Post: 08-18-2016, 03:17 AM
  3. Excel vba sql select
    By r123k in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-14-2014, 11:23 AM
  4. Replies: 4
    Last Post: 06-17-2013, 05:21 AM
  5. how to get excel to select a value
    By imatthews2001 in forum Excel General
    Replies: 3
    Last Post: 09-14-2011, 02:39 PM
  6. How to Use CELLS,RANGE,SELECT,SELECTION & OTHER BASIC EXCEL OBJECTS IN EXCEL VBA
    By excelkeechak in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-25-2008, 12:07 PM
  7. [SOLVED] In Excel 2000, How do you select the whole of a worksheet (Select.
    By Rascal in forum Excel General
    Replies: 1
    Last Post: 03-04-2005, 08:06 PM

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