+ Reply to Thread
Results 1 to 5 of 5

returning every nth row in a column

  1. #1
    Forum Contributor
    Join Date
    08-14-2008
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    103

    Smile returning every nth row in a column

    Hi all,

    If I have a column full of data is there a way to copy every nth row to a new column?

    For example, I may have dates and corresponding days of the week. Can I copy the date of each tuesday (i.e. every 7th row) to a new column?

    Thanks
    Last edited by HammerTime; 02-17-2009 at 10:42 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: returning every nth row in a column

    Well, for dates, you wouldn't actually do that, would you? You would enter the first Tuesday's date, then use a formula like =A3+7 to get the date that is 7 days later.

    Anyway. If you want to get the values in cells A3,A10,A17,A24,A31 to appear in a column starting at say D1,D2,D3,D4, you could use something like this:

    =INDIRECT("A"&ROW()*7-4)

    The -4 is to give you the first correct value, then that should translate for all the rest. Make sure the cells are formatted the way you want since INDIRECT doesn't evaluate cells automatically the way other formulas often do in Excel.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    08-14-2008
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    103

    Re: returning every nth row in a column

    Thanks, that is great! I didn't realise it was so easy

    And yes, you are right, dates is a bad example

  4. #4
    Registered User
    Join Date
    01-06-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: returning every nth row in a column

    Apologies. Deleted
    Attached Images Attached Images
    Last edited by maszyna; 01-06-2013 at 11:59 AM. Reason: Rules

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: returning every nth row in a column

    @maszyna

    Your breaking the forum rules, interruption in another one's question.

    http://www.excelforum.com/forum-rule...rum-rules.html

    Please start your own question.

    It also will help if you add an excel example instead of a .png
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

+ 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