+ Reply to Thread
Results 1 to 4 of 4

Sorting every Nth row to separate columns

  1. #1
    Registered User
    Join Date
    01-15-2006
    Posts
    46

    Sorting every Nth row to separate columns

    I have a list of production orders, 5 columns"

    Invoice # | QTY | Part Number | Part Code | Time

    I want to sort this information, using every Nth line, into separate 5 column groups for Person1 | Person2 | up to Person 8, where N is the "number people reporting" that day.

    I have tried an offset formula: =OFFSET(B1,(ROW(A1))*$I$1,0) Where B1 is the starting point of the production orders and $I$1 is the "number of people reporting" that day. I haven't gotten the information to sort correct, And I would suspect that some snippet of code would do what i need much faster and easier.

    I would like both an example of the code, and and explation of what each line is doing. I've yet to take a VBA class so i don't know what i'm doing there just yet.

    I will also likely need some advice on how to add this to a button to sort and resort if the "number of people reporting" changes.

    Thanks in advance.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Sorting every Nth row to separate columns

    Hi Beechum,

    Perhaps if you upload an example of "before" and "after" data, others may be able to visualize and come up with a solution for you.

  3. #3
    Registered User
    Join Date
    01-15-2006
    Posts
    46

    Re: Sorting every Nth row to separate columns

    Right, thank you.

    You'll notice in columns B:F the information migrate.

    In columns L:P, in row6 is the starting point for B2:F2, next S6:W6, on so on.

    The number of people reporting, in I1, will determine the number of groups to sort to. In this example, you'll notice I1 is 3, and the groups sorted to, is 3. I would like this info to sort to the 4th group to the right when necessary as well.

    ----------------

    I've also included the example of the offset function not working as i would like. Please feel free to correct me, because I suspect that would be an more user friendly function for the rest of my coworkers to follow logically.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-15-2006
    Posts
    46

    Re: Sorting every Nth row to separate columns

    lil help please?

+ 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