+ Reply to Thread
Results 1 to 5 of 5

Look up category and sum all that fit into that category

  1. #1
    Registered User
    Join Date
    08-20-2013
    Location
    Stilring, UK
    MS-Off Ver
    Excel 2007
    Posts
    3

    Look up category and sum all that fit into that category

    Hello,
    I have a problem that is similar to that posted by some others here but not enough to answer my problem. I have attached an example of the type of problem.

    I want to lookup the "colour" that my category fits into, then sum all the numbers of that colour to give a % that my category contributes to that colour.

    In my actual spread-sheet, I have 320 "colours" and 1700 categories so a lot of "if" commands or summing the values individually will not be practical. I cannot attach it as it is over 20MB but this example is the exact problem in miniature.

    I have tried lookup commands and combination of index and match but the lookup only returns the last number in the list, whereas the index/match returns the 1st number without summing them.

    Can anyone help me please?!

    Many thanks,

    StV.
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Look up category and sum all that fit into that category

    Try this in H2:

    =E2/SUMPRODUCT(($B$2:$B$7=VLOOKUP(D2,$A$2:$B$7,2,0))*($E$2:$E$7))

    Hope this helps.

    Pete

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

    Re: Look up category and sum all that fit into that category

    With an pivot table.

    See the attached file.
    Attached Files Attached Files
    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.

  4. #4
    Registered User
    Join Date
    08-20-2013
    Location
    Stilring, UK
    MS-Off Ver
    Excel 2007
    Posts
    3

    Thumbs up Re: Look up category and sum all that fit into that category

    Thanks Pete,
    that's great. Seems to work fantastic... just need to apply it to my several thousand lines of data now....

    I think I can figure it out from what you put here!

    cheers,

    St.V

  5. #5
    Registered User
    Join Date
    08-20-2013
    Location
    Stilring, UK
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Look up category and sum all that fit into that category

    Many thanks Oeldere, but I think I am going to go with Pete's solution. As I need the layout in a specific way.

    Cheers,

    R.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to Chart values for Division vs Category and Sub-Category?
    By rahulgk in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-11-2013, 06:33 AM
  2. Filtering by text
    By saltarazan in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-16-2013, 04:18 AM
  3. Replies: 2
    Last Post: 09-14-2012, 04:31 AM
  4. [SOLVED] Productsum: Highest Frequency Category, Specific Main Category, Frequency of Category
    By T86157 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-24-2012, 12:43 PM
  5. Single field fits fault category, event category determined by group of faults
    By SchoobsVT in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-07-2010, 08:51 AM

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