+ Reply to Thread
Results 1 to 3 of 3

Tricky - sort within a sort, assistance required please

Hybrid View

  1. #1
    Neil
    Guest

    Tricky - sort within a sort, assistance required please

    Hi All,

    I have a tricky excel macro opportunity.....

    My sheet(s) consist of sales data for a number of companies, populating
    columns A through to O.

    Column A lists company names.
    Column M lists Sales $ achieved.

    Within column A, there may be a group of identical entries (company names)
    that are differentiated somewhere else in the sheet.

    What I would like to do is sort by group of companies first, so the group of
    like named companies in column A with the greatest
    aggregate total of sales in column M should be listed at the top of the
    sorted list then each of the comanies within the group should then
    be sorted by Sales $, column M.

    ie. for columns A & M

    CCC $34
    CCC $26
    CCC $21
    CCC $19
    PP $ 89
    BB $75
    BB$6

    The CCC group of companies has a total Sales $ of 100, hence is listed
    first.
    The company PP has a total of $89 hence is listed second.
    Company BB totals $81 so is listed third.

    Make sense ???

    I appreciate the groups responses,

    Thanks,

    Neil



  2. #2
    Bob Phillips
    Guest

    Re: Tricky - sort within a sort, assistance required please

    You need to create a column that calculates the total for each company, and
    use that in the sort.

    Maybe in N1

    =SUMIF(A:A,A1,M:M)

    an d copy down

    --
    HTH

    Bob Phillips

    "Neil" <me@home.com> wrote in message
    news:dg8pk7$21r2$1@otis.netspace.net.au...
    > Hi All,
    >
    > I have a tricky excel macro opportunity.....
    >
    > My sheet(s) consist of sales data for a number of companies, populating
    > columns A through to O.
    >
    > Column A lists company names.
    > Column M lists Sales $ achieved.
    >
    > Within column A, there may be a group of identical entries (company names)
    > that are differentiated somewhere else in the sheet.
    >
    > What I would like to do is sort by group of companies first, so the group

    of
    > like named companies in column A with the greatest
    > aggregate total of sales in column M should be listed at the top of the
    > sorted list then each of the comanies within the group should then
    > be sorted by Sales $, column M.
    >
    > ie. for columns A & M
    >
    > CCC $34
    > CCC $26
    > CCC $21
    > CCC $19
    > PP $ 89
    > BB $75
    > BB$6
    >
    > The CCC group of companies has a total Sales $ of 100, hence is listed
    > first.
    > The company PP has a total of $89 hence is listed second.
    > Company BB totals $81 so is listed third.
    >
    > Make sense ???
    >
    > I appreciate the groups responses,
    >
    > Thanks,
    >
    > Neil
    >
    >




  3. #3
    Neil
    Guest

    Re: Tricky - sort within a sort, assistance required please

    Excellent Bob,

    Another good example of using a helper cell (column)

    Thanks,

    Neil


    "Bob Phillips" <bob.phillips@notheretiscali.co.uk> wrote in message
    news:OmbTCfRuFHA.2076@TK2MSFTNGP14.phx.gbl...
    > You need to create a column that calculates the total for each company,
    > and
    > use that in the sort.
    >
    > Maybe in N1
    >
    > =SUMIF(A:A,A1,M:M)
    >
    > an d copy down
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > "Neil" <me@home.com> wrote in message
    > news:dg8pk7$21r2$1@otis.netspace.net.au...
    >> Hi All,
    >>
    >> I have a tricky excel macro opportunity.....
    >>
    >> My sheet(s) consist of sales data for a number of companies, populating
    >> columns A through to O.
    >>
    >> Column A lists company names.
    >> Column M lists Sales $ achieved.
    >>
    >> Within column A, there may be a group of identical entries (company
    >> names)
    >> that are differentiated somewhere else in the sheet.
    >>
    >> What I would like to do is sort by group of companies first, so the group

    > of
    >> like named companies in column A with the greatest
    >> aggregate total of sales in column M should be listed at the top of the
    >> sorted list then each of the comanies within the group should then
    >> be sorted by Sales $, column M.
    >>
    >> ie. for columns A & M
    >>
    >> CCC $34
    >> CCC $26
    >> CCC $21
    >> CCC $19
    >> PP $ 89
    >> BB $75
    >> BB$6
    >>
    >> The CCC group of companies has a total Sales $ of 100, hence is listed
    >> first.
    >> The company PP has a total of $89 hence is listed second.
    >> Company BB totals $81 so is listed third.
    >>
    >> Make sense ???
    >>
    >> I appreciate the groups responses,
    >>
    >> Thanks,
    >>
    >> Neil
    >>
    >>

    >
    >




+ 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