+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    01-15-2010
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2003
    Posts
    2

    Advanced Worksheet functions for sorting and summations.

    All -- I have the following dilemna, I'm trying to sort/sum/transpose information that comes from a database into something that is a bit more usable for my specific needs. I've given an example below -- with the source and what I would like to return. This is a simplification, In reality, I have about 425 types, 9 "colours" and weight obviously varies. I appreciate in advance your help.

    Source:
    Type Colour weight
    Apple Red 1.2
    Apple Green 1.5
    Banana Yellow 2
    Apple Red 1.4
    Pear Brown 0.7
    Pear Brown 0.9
    Banana Yellow 2.4
    Apple Green 4.4
    Pear Green 1.1

    Return:
    type Total TCGR TCRED TCY TCB TotWeight
    Apple 4 3 1 0 0 8.5
    Banana 2 0 0 0 2 4.4
    Pear 3 1 0 2 0 2.7

  2. #2
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,379

    Re: Advanced Worksheet functions for sorting and summations.

    Have you considered using a Pivot Table ?

    With a PT you would I'd concede struggle to show the Return exactly as you have laid out but a PT is purpose built for mass aggregation analysis.

    Attached is a basic example using your data...

    EDIT:
    I just noticed the "sorting" element - you can sort Type in the PT by Sum of Weight Desc... you can sort Colours in the PT by Count of Weight Desc
    Attached Files Attached Files
    Last edited by DonkeyOte; 01-15-2010 at 04:39 AM.

  3. #3
    Registered User
    Join Date
    01-15-2010
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Advanced Worksheet functions for sorting and summations.

    The challenge is I have to have a new table to link to another database program -- and my coding skills definitely need some work... I'm basically linking Access/Excel/and a Mapping Program....

    So -- the new table has to look as I defined, because the fruit column is the unique joining feature.

  4. #4
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,379

    Re: Advanced Worksheet functions for sorting and summations.

    Quote Originally Posted by geogliz
    I have to have a new table to link to another database program
    that may be but in reality you would still be best served using the PT if only to do the aggregation for you (it will be more efficient than conducting the same with formulae given the sort element etc...) - you can build your final table from the PT can you not ?

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0