+ Reply to Thread
Results 1 to 2 of 2

Help with 'Selective' SUMPRODUCT Formula

  1. #1
    Registered User
    Join Date
    04-28-2016
    Location
    England
    MS-Off Ver
    2016
    Posts
    1

    Help with 'Selective' SUMPRODUCT Formula

    Hello,

    I have a large table of data and want to calculate a weighted mean for certain values which match a criteria. To do this for the whole data I've got =SUMPRODUCT(D:D, F:F)/SUM(F:F) which works perfectly. However, I'd now like this to apply to only certain values, eg:

    B |C |D
    x |1 |0.1
    y |2 |0.1
    y |5 |0.1
    y |4 |0.2
    z |2 |0.2
    z |1 |0.2
    x |0 |0.5
    y |0 |0.5
    x |1 |0.5
    x |2 |0.5

    And have it only perform the formula I mentioned earlier on say, values in the same row as an x.



    Best,

    Declan
    Last edited by 99Declan; 05-04-2016 at 01:58 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Help with 'Selective' SUMPRODUCT Formula

    Instead of SP, try AVERAGEIFS()...
    =averageifS(D:D, B:B,"x")
    (not sure where column F comes in there?)

    Also, try to avoid using full-column references in SP, it will slow your file down
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. a formula that is selective
    By treatedwood in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-26-2014, 04:05 AM
  2. [SOLVED] Selective repetition formula
    By utahmoose in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-17-2014, 09:53 PM
  3. count number ocurences formula
    By tonygcyprus in forum Excel General
    Replies: 4
    Last Post: 12-22-2013, 04:36 AM
  4. Replies: 5
    Last Post: 12-11-2012, 05:04 AM
  5. [SOLVED] sumproduct of multiple conditions, with 1 column with selective condition
    By melvyndb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-25-2012, 04:55 AM
  6. VBA Code for Selective formula writing
    By Fuerteventura in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-24-2005, 10:05 AM
  7. Selective formula pasting
    By Dave L in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-11-2005, 04:05 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