+ Reply to Thread
Results 1 to 10 of 10

Multiple Criteria Calculation both Criteria sit in the one column in multiple locations.

  1. #1
    Registered User
    Join Date
    10-11-2012
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    45

    Multiple Criteria Calculation both Criteria sit in the one column in multiple locations.

    Im trying to find an efficient way to calculate a weighted total in the attached spreadsheet.

    My issue is that the criteria exist within the same column so i have tried a criteria based sumproduct with array but having no luck.

    There is a lengthy way to do it i have written the layout of the result below.

    (Business A (Margin * Sales) + Business B (Margin * Sales) + Business C (Margin * Sales)) / Sumif (Sales)

    But the issue is my actual work sheet has about 20 businesses, so this will be a very inefficient method to do this.

    Any help would be greatly appreciated!!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    13,764

    Re: Multiple Criteria Calculation both Criteria sit in the one column in multiple location

    maybe like this.
    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.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    19,102

    Re: Multiple Criteria Calculation both Criteria sit in the one column in multiple location

    Try this in B18

    =SUMPRODUCT(--($A$3:$A$18="% Margin"),($B$5:$B$20),($B$3:$B$18))/SUMPRODUCT(($A$3:$A$15="Retail Sales")*($B$3:$B$15))

    Note that the B range (in red) is OFFSET to reference the "Retail Sales" values.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    19,102

    Re: Multiple Criteria Calculation both Criteria sit in the one column in multiple location

    Amended as got the ranges wrong ....

    =SUMPRODUCT(--($A$3:$A$13="% Margin"),($B$5:$B$15),($B$3:$B$13))/SUMPRODUCT(($A$3:$A$15="Retail Sales")*($B$3:$B$15))

  5. #5
    Registered User
    Join Date
    10-11-2012
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Multiple Criteria Calculation both Criteria sit in the one column in multiple location

    Perfect, thanks a lot!! Exactly what i was looking for can i ask what the '--' stand for?

  6. #6
    Registered User
    Join Date
    10-11-2012
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Multiple Criteria Calculation both Criteria sit in the one column in multiple location

    Quote Originally Posted by JohnTopley View Post
    Amended as got the ranges wrong ....

    =SUMPRODUCT(--($A$3:$A$13="% Margin"),($B$5:$B$15),($B$3:$B$13))/SUMPRODUCT(($A$3:$A$15="Retail Sales")*($B$3:$B$15))
    Perfect, thanks a lot!! Exactly what i was looking for can i ask what the '--' stand for?

  7. #7
    Registered User
    Join Date
    10-11-2012
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Multiple Criteria Calculation both Criteria sit in the one column in multiple location

    Quote Originally Posted by oeldere View Post
    maybe like this.
    Thanks for the response that works, however i was looking for a solution that could be resolved within a formula without adding additional fields.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    19,102

    Re: Multiple Criteria Calculation both Criteria sit in the one column in multiple location

    The "--" simply converts TRUE/FALSE to 1/0

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    19,102

    Re: Multiple Criteria Calculation both Criteria sit in the one column in multiple location

    this will work just as well

    =SUMPRODUCT(($A$3:$A$13="% Margin")*($B$5:$B$15)*($B$3:$B$13))/SUMPRODUCT(($A$3:$A$15="Retail Sales")*($B$3:$B$15))

  10. #10
    Forum Guru Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Multiple Criteria Calculation both Criteria sit in the one column in multiple location

    Quote Originally Posted by oeldere View Post
    maybe like this.
    Sorry for off-topic interjection:

    Although there is no official rule regarding this behavior, we request that wherever possible both the question AND the answer be provided in substantive detail here within the thread. An attached workbook is an excellent aid for posing a question and offering a solution, but solely doing that with no in thread explanation makes it difficult for researchers to understand or consider the Q & A of this thread without downloading what may be a pointless doc to them, if they can do that at all. Doing that also hides the content from search engines so others may never benefit from this.

    I'm sure you understand, and we look forward to seeing you post your formulas/macros in your posts for the searching benefit of all.

    Thanks again for all your hard work here!
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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] Multiple Criteria Calculation
    By pandora1a2b in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-23-2015, 10:52 AM
  2. [SOLVED] Percentage calculation based on multiple date criteria
    By odahilys in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-26-2015, 10:10 AM
  3. [SOLVED] Multiple Criteria SUMIF Using Column as Negative Criteria
    By freybe06 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-24-2014, 04:46 PM
  4. [SOLVED] UDF for sum of multiple criteria in multiple columns and single criteria in multiple colum
    By Ganesh7299 in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 11-22-2013, 04:26 AM
  5. Replies: 6
    Last Post: 08-04-2013, 11:53 AM
  6. Calculation based on multiple criteria
    By excelaudio in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-05-2013, 03:25 PM
  7. Replies: 2
    Last Post: 10-05-2011, 12:43 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