+ Reply to Thread
Results 1 to 4 of 4

Maxifs from Sumifs

  1. #1
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Poland
    MS-Off Ver
    MS Office 365
    Posts
    174

    Maxifs from Sumifs

    Hi,

    I have table with columns like:
    column1, "category_1"
    column2, "category_2"
    column3, "quantity"

    In each row I want to have max (by category_1) from sum by category_1 and category_2.
    By formulas I can done it by:
    column4, "sum by cat1+cat2": =SUMIFS([quantity];[category_1];[@[category_1]];[category_2];[@[category_2]])
    column5, "max by cat1 from sum by cat1+cat2": =MAXIFS([sum by cat1+cat2];[category_1];[@[category_1]])

    At my real project, the value for current row at column5 (Maxifs) is calculated by VBA - it works well.

    But the data sheet has several thousands of rows and SUMIFS calculations take lot of time.
    So I tried calculate column4 values also by VBA. It sums correctly but it is being done only for one row so at the end calculation for column5 is not correct

    I do not need values for column4 loaded to worksheet so may be there is some way to create one Maxifs formula by VBA that can calculate what I want in correct way?
    maxifs1.PNGmaxifs2.PNG

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Maxifs from Sumifs

    so far this post has had over 280 hits, I'm suspecting you aren't getting the help you need because it isn't totally clear and you have posted screen shots instead of a workbook.
    I recommend you post a sample workbook with enough information that will give people an understanding of what you have and are dealing with AND what you want.
    So INCLUDE your examples AND your expected results.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Poland
    MS-Off Ver
    MS Office 365
    Posts
    174
    Hi Sambo kid,

    Thanks for reply. What I want to have is what you can see at screenshots but without formulas in column4. It slows the worksheet down.

    I tried attach wb but cannot see how to do it

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Maxifs from Sumifs

    I assumed with 140+ posts you knew, my bad.
    to attach a workbook, go advanced (under this quick reply window) then midway down the page is a blue hypertext "manage attachments" - click on that. It will open a window and you can browse to your workbook, then upload and hit ok and (maybe another) ok then it should be uploaded.
    I'm no good with VBA but at least i thought I'd try to get your post started if nothing else.

+ 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. [SOLVED] Second highest using maxifs
    By GIS2013 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-14-2020, 09:04 PM
  2. [SOLVED] MAXIFS with Array
    By matthew.leroy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-13-2019, 02:18 PM
  3. MAXIFS with OR criteria
    By HalPlz in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 02-06-2019, 03:24 AM
  4. [SOLVED] I need a MAXIFS formula simalr to SUMIFS but with max value
    By Vicarious in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-25-2017, 04:50 PM
  5. MAXIFS with criteria
    By shiftyspina in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 01-25-2017, 10:14 AM
  6. [SOLVED] MaxIFs help
    By Hondahawkrider in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-25-2016, 02:23 PM
  7. MaxIFS help
    By Hondahawkrider in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-06-2016, 03:17 PM

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