+ Reply to Thread
Results 1 to 6 of 6

Sorting while grouping 3 rows together...

  1. #1
    steve
    Guest

    Sorting while grouping 3 rows together...

    i need to keep three rows together while i sort by column. so it will be
    groups of three.

    i thought to copy the name down three times, but is there a way i can
    automate this? this is a sheet that gets updated everyday.

    thank you

  2. #2
    Registered User
    Join Date
    06-21-2005
    Posts
    19
    Might be just me, but I don't quite understand what you want here. Could you give a simple example?

    Gaz

  3. #3
    Dave Peterson
    Guest

    Re: Sorting while grouping 3 rows together...

    I assumed headers in row 1 and the name in column A.

    I inserted a new column A (moving the name to column B).

    I put =b2 in A2.

    Then I put =IF(MOD(ROW(),3)=2,B3,A2&"x")
    in B3 and dragged down.

    I started with names like:
    Name
    aaa
    aaa
    aaa
    eee
    eee
    eee
    bbb
    bbb
    bbb
    ccc
    ccc
    ccc

    My new columns A:B looked like
    Key Name
    aaa aaa
    aaax aaa
    aaaxx aaa
    eee eee
    eeex eee
    eeexx eee
    bbb bbb
    bbbx bbb
    bbbxx bbb
    ccc ccc
    cccx ccc
    cccxx ccc

    Then I converted column A to values (edit|copy, edit|paste special|values).

    Then sorted by that helper column.

    When I was done, I deleted column A.


    steve wrote:
    >
    > i need to keep three rows together while i sort by column. so it will be
    > groups of three.
    >
    > i thought to copy the name down three times, but is there a way i can
    > automate this? this is a sheet that gets updated everyday.
    >
    > thank you


    --

    Dave Peterson

  4. #4
    Jay
    Guest

    Re: Sorting while grouping 3 rows together...

    > i need to keep three rows together while i sort by column. so it will
    > be groups of three.
    >
    > i thought to copy the name down three times, but is there a way i can
    > automate this? this is a sheet that gets updated everyday.


    One way is to use a helper column.

    I'm supposing that column A has the field to be sorted, and you want to
    sort by the first of the three values.

    In the helper column, put this in row 1:
    =A1
    Put the identical formula in rows 2 and 3.

    Select the three cells and extend down for the length of the list.

    Then select the whole table and sort by the helper column.

  5. #5
    steve
    Guest

    Re: Sorting while grouping 3 rows together...

    right, that's what i did. The problem i am running into is that there are
    blank cells for entries that have not been entered yet. so when i sort, the
    equations like =A1 get messed up. here is what it looks like

    Project Name Project status Salesman Date

    walmart estimate km 6/21
    detail
    barlist

    estimate, detail, barlist are seperate cells, but when i sort by project
    name, i need these three rows to be considered one row.

    "Jay" wrote:

    > > i need to keep three rows together while i sort by column. so it will
    > > be groups of three.
    > >
    > > i thought to copy the name down three times, but is there a way i can
    > > automate this? this is a sheet that gets updated everyday.

    >
    > One way is to use a helper column.
    >
    > I'm supposing that column A has the field to be sorted, and you want to
    > sort by the first of the three values.
    >
    > In the helper column, put this in row 1:
    > =A1
    > Put the identical formula in rows 2 and 3.
    >
    > Select the three cells and extend down for the length of the list.
    >
    > Then select the whole table and sort by the helper column.
    >


  6. #6
    Jay
    Guest

    Re: Sorting while grouping 3 rows together...

    =?Utf-8?B?c3RldmU=?= wrote:

    > right, that's what i did. The problem i am running into is that there
    > are blank cells for entries that have not been entered yet. so when i
    > sort, the equations like =A1 get messed up. here is what it looks
    > like
    >
    > Project Name Project status Salesman
    > Date
    >
    > walmart estimate km
    > 6/21
    > detail
    > barlist
    >
    > estimate, detail, barlist are seperate cells, but when i sort by
    > project name, i need these three rows to be considered one row.


    The idea is to sort by the helper column.

    Below is an example. Save it in a file with the ".csv" extension.

    Double-clicking the csv file should open it in Excel.

    Select everything and sort bon the Helper column.

    --------------------- cut here ------------------------
    Project Name,Project status,Salesman,Date,Helper
    walmart,estimate,km,6/21,=A2
    ,detail,,,=A2
    ,barlist,,,=A2
    sears,estimate,ab,2/13,=A5
    ,detail,cd,3/22,=A5
    ,cancelled,tr,4/11,=A5
    penney,estimate,mi,6/16,=A8
    ,detail,,,=A8
    ,barlist,,,=A8


+ 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