+ Reply to Thread
Results 1 to 11 of 11

Using SUMIFS & LARGE (or similar?)

  1. #1
    Registered User
    Join Date
    12-08-2014
    Location
    Abu Dhabi, UAE
    MS-Off Ver
    2013
    Posts
    5

    Using SUMIFS & LARGE (or similar?)

    Hello,

    I have a sheet with 3 columns filled in:
    A is "Veggies" in (text) with 3 items; carrots, cucumbers & peppers
    B is the "value" I want to sum (numbers) (the column is long & updated weekly so I need the formula to be dynamic)
    C is the "date" in (week numbers) (same as above)

    I am looking to have 2 calculations here:
    - The sum of the 5 largest "values" provided they are "carrots" (then, the sum of the top 15, then top 40)
    - The sum of the 5 (then 15, 40) largest "values" provided they are "carrots" for a period of time inferior to X numbers of weeks ("date").

    I've been browsing tons of forums but can't figure out how to do.
    Note that I will also need to divide this value by the same formula from another sheet in a later step.

    Any help is appreciated!

    Thanks a lot
    Last edited by shalx; 12-08-2014 at 03:38 AM.

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,937

    Re: Using SUMIFS & LARGE (or similar?)

    Attach sample file
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Using SUMIFS & LARGE (or similar?)

    All you describe can easily be done with pivot tables.

    If you can upload a sample file, we can show you how.

  4. #4
    Registered User
    Join Date
    12-08-2014
    Location
    Abu Dhabi, UAE
    MS-Off Ver
    2013
    Posts
    5

    Re: Using SUMIFS & LARGE (or similar?)

    SAMPLE.xlsx

    Thanks for the fast help!
    Here you go.

  5. #5
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Using SUMIFS & LARGE (or similar?)

    Great. This is a good sample file. Now some questions.

    - The sum of the 5 largest "values" provided they are "carrots"

    5 largest (carrot) values as per <what>? Can you mock up the expected result?
    then, the sum of the top 15, then top 40 -- As above, top 15 of what? These will need to be different pivot tables to sum different settings. Mock up the correct result for your data sample, so we know what to aim for.

    - The sum of the 5 (then 15, 40) largest "values" provided they are "carrots" for a period of time inferior to X numbers of weeks ("date"). -- Again, mock up the desired result. Which of the data rows qualify? Why?

    While I said that this can be done with Pivot Tables, I still need the exact business logic to apply the correct filter.

    "the 5 (then 15, 40) largest " Such a sort is not possible within a single pivot table. You need separate pivots to do that.

    As soon as you can mock up some results based on your data and your logic, I'll try to build it with a pivot table.

  6. #6
    Registered User
    Join Date
    12-08-2014
    Location
    Abu Dhabi, UAE
    MS-Off Ver
    2013
    Posts
    5

    Re: Using SUMIFS & LARGE (or similar?)

    Ok so for the mocking up:

    1.
    - if I display only "Carrots" in column B, then sort column C from Largest to Smallest, it will be the sum of the 5 largest values in column (manually, that gives me 101512).
    - Same for the sum of the 15 then 40 largest values.

    2. with the data parameter
    - If I display only "Carrots" in column B, I want to take the largest 5 / 15 / 40 values from column C provided I can select them among a certain set of weeks (Column D). eg. from week 0 to 24, the 5 largest values for the carrots.
    Does that make sense?

  7. #7
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Using SUMIFS & LARGE (or similar?)

    What you describe in your last comment can be done with the auto-filter, without involving pivot tables.

    1. Filter column B to show only "carrots". Then filter column C > Number Filters > Top 10 > select the number of items you want to show.

    2. Filter on colun B to show only "carrots". Then filter on column A "Date" > Date Filters > Between (set start and end date). Then filter by column C > Number filters > top 10 > select number of items.

    You should turn the table into an Excel Table: Click any cell in the table and select Insert > Table. In Excel 2013 you can use slicers on simple data tables, so you can create a slicer for the veggie category and another slicer for the date range, or for the week. Then turn on the Total row for the table. Select the Veggie. Shift click the Week slicer for one or more weeks. Scroll down to see the total.

    2014-12-08_21-19-23.png

    cheers, teylyn
    Attached Files Attached Files

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2502
    Posts
    13,700

    Re: Using SUMIFS & LARGE (or similar?)

    I'm not clear on the "inferior to X number of weeks" part, too.

    While teylyn is working up a pivot table I came up with this formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    that addresses the carrots/5/15/40 criteria. It appears to work.

    It must be array entered (committed with Ctrl+Shift+Enter) in G3 (here) and filled across. Like this:

    Row\Col
    F
    G
    H
    I
    J
    1
    carrots
    2
    5
    15
    40
    3
    258720
    757772
    1401765
    4


    G1, G2:I2 are helper/criteria cells.

  9. #9
    Registered User
    Join Date
    12-08-2014
    Location
    Abu Dhabi, UAE
    MS-Off Ver
    2013
    Posts
    5

    Re: Using SUMIFS & LARGE (or similar?)

    Hey Teylyn!
    Thanks for the fast really good answer!
    My issue here is that I need it to have it all on 3 different tables, hence my preference for a formula - a more elaborated version of SUMIFS?
    I re-attached SAMPLE.xlsx, that has the new sheet "Table" with the fields I need to complete.
    From what I understand, a formula can't really help me here... right?
    Attached Files Attached Files

  10. #10
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,937

    Re: Using SUMIFS & LARGE (or similar?)

    See attached file
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    12-08-2014
    Location
    Abu Dhabi, UAE
    MS-Off Ver
    2013
    Posts
    5

    Re: Using SUMIFS & LARGE (or similar?)

    Hey nflsales!
    This is exactly what I needed, and from there I understand the process!
    Thanks tons for taking the time to help me on that.
    Thanks FlameRetired too because while it's not the best for how I want to use this sheet in the future, I can see where to use your version in other docs.
    Thanks teylyn too for the tip on the pivot tables! Same thing, there are other doc I'll be able to use that with.
    Have a lovely day / evening y'all

+ 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. Sumifs, large & rank
    By M1234 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-28-2013, 11:23 AM
  2. [SOLVED] Summarize data with count ifs/sumifs or similar
    By bertrand82 in forum Excel General
    Replies: 1
    Last Post: 05-21-2012, 06:58 AM
  3. SUMIFS with MONTH() or other similar functions
    By e_lad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-15-2011, 11:25 AM
  4. Formula similar to SUMIFS
    By cmb80 in forum Excel General
    Replies: 10
    Last Post: 02-09-2011, 10:38 AM
  5. Posting Large amounts of similar stuff
    By Iamxerocool in forum Excel General
    Replies: 2
    Last Post: 07-06-2005, 07:05 PM

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.6.0 RC 1