+ Reply to Thread
Results 1 to 10 of 10

=sumproduct (for weighted average) -- need it to stop counting blank cells.

  1. #1
    Registered User
    Join Date
    08-17-2015
    Location
    Mississauga
    MS-Off Ver
    2013
    Posts
    4

    Angry =sumproduct (for weighted average) -- need it to stop counting blank cells.

    The formula I typed is
    =SUMPRODUCT(E2:E17,D2:D17/SUM(D2:D17))

    Works fine but gives me a lowered average because it counts blank cells as a 0%.

    I want it to count only those cells that have the % value in them.

    Update: thanks for the quick reply; I've uploaded the file.
    Attached Files Attached Files
    Last edited by spbone; 08-17-2015 at 03:01 PM.

  2. #2
    Forum Guru Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2010 on Linux
    Posts
    11,622

    Re: =sumproduct (for weighted average) -- need it to stop counting blank cells.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    50,412

    Re: =sumproduct (for weighted average) -- need it to stop counting blank cells.

    Perhaps add another criteria, something like...
    E2:E17<>0
    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

  4. #4
    Registered User
    Join Date
    08-17-2015
    Location
    Mississauga
    MS-Off Ver
    2013
    Posts
    4

    Re: =sumproduct (for weighted average) -- need it to stop counting blank cells.

    Didn't work...
    @Pepe le Mokko sorry; FDibbin's add-another-criteria didn't work for me. When I tried doing that I just got 0.00%, but it's probably my limited knowledge of Excel.
    Last edited by spbone; 08-17-2015 at 02:38 PM.

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

    Re: =sumproduct (for weighted average) -- need it to stop counting blank cells.

    g2=SUMPRODUCT(($B$3:$B$20="Section 1")*($D$3:$D$20))/SUMPRODUCT(($B$3:$B$20="Section 1")*($A$3:$A$20))

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

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: =sumproduct (for weighted average) -- need it to stop counting blank cells.

    Try

    F2: =SUMPRODUCT(B$2:B$17,A$2:A$17)/SUMIF(B$2:B$17,">0",A$2:A$17)
    F3: =SUMPRODUCT(C$2:C$17, A$2:A$17)/SUMIF($C$2:$C$17,">0",A$2:A$17)

  7. #7
    Forum Guru Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2010 on Linux
    Posts
    11,622

    Re: =sumproduct (for weighted average) -- need it to stop counting blank cells.

    Quote Originally Posted by spbone View Post
    Didn't work...
    I love this kind of non-information. Keeps us guessing as to what did not work

  8. #8
    Registered User
    Join Date
    08-17-2015
    Location
    Mississauga
    MS-Off Ver
    2013
    Posts
    4

    Re: =sumproduct (for weighted average) -- need it to stop counting blank cells.

    @oeldere Thanks for replying! Your answer did work, but you changed the formatting of the table.

  9. #9
    Registered User
    Join Date
    08-17-2015
    Location
    Mississauga
    MS-Off Ver
    2013
    Posts
    4

    Re: =sumproduct (for weighted average) -- need it to stop counting blank cells.

    Quote Originally Posted by Jonmo1 View Post
    Try

    F2: =SUMPRODUCT(B$2:B$17,A$2:A$17)/SUMIF(B$2:B$17,">0",A$2:A$17)
    F3: =SUMPRODUCT(C$2:C$17, A$2:A$17)/SUMIF($C$2:$C$17,">0",A$2:A$17)
    Thank you. Your answer worked. I hadn't expected my problem to be solved so fast.
    Thanks to everyone who replied.

  10. #10
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: =sumproduct (for weighted average) -- need it to stop counting blank cells.

    You're welcome.

+ 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. sumproduct function for weighted average
    By copperdog in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-18-2014, 10:18 PM
  2. [SOLVED] Weighted Average with (=sumproduct and =sumif)
    By wagstaffjh in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-22-2014, 12:30 PM
  3. [SOLVED] Weighted Average formula / SUMPRODUCT to ignore blank cells
    By macrorookie in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-17-2014, 08:05 PM
  4. Adjust weighted average (sumproduct) for empty cells
    By robertgroen92 in forum Excel General
    Replies: 3
    Last Post: 03-19-2014, 08:13 AM
  5. Weighted Average IF (sumproduct conditional)
    By Leopold2000 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-16-2013, 03:27 PM
  6. [SOLVED] Average Weighted Grades with Blank Cells
    By JonathanEngr in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-14-2013, 02:25 PM
  7. [SOLVED] Help with IF and SUMPRODUCT to calculate weighted average??
    By consulttk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-02-2012, 03:56 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