+ Reply to Thread
Results 1 to 4 of 4

Adjust weighted average (sumproduct) for empty cells

  1. #1
    Registered User
    Join Date
    02-21-2014
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    19

    Adjust weighted average (sumproduct) for empty cells

    I'm calculating a weighted average using the sumproduct function as follows: =SUMPRODUCT(L13:L20, $V$25:$V$32)/SUM($V$25:$V$32). Where the values are in the L column and the weights are in the V column.

    The problem is that sometimes there's an empty cell in the L column, which really scews the weighted average. I'd like the function to either calculate the weighted average for the cells that do have a value, or it would also be fine if the outcome of the function just shows a problem because on or more of the cells in column L are empty.

    I can't seem to fix it, any help is appreciated.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Adjust weighted average (sumproduct) for empty cells

    you can try
    =SUMPRODUCT((L13:L20<>"")*L13:L20, $V$25:$V$32)/SUMIF(L13:L20,"<>",$V$25:$V$32)
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    02-21-2014
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Adjust weighted average (sumproduct) for empty cells

    This couldn't work any better. Thanks a lot for your help man, really appreciate it!

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Adjust weighted average (sumproduct) for empty cells

    SUMPRODUCT will ignore blanks anyway so really you only need to replace the SUM with SUMIF, i.e.

    =SUMPRODUCT(L13:L20, $V$25:$V$32)/SUMIF(L13:L20,"<>",$V$25:$V$32)
    Audere est facere

+ 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. Weighted Average IF (sumproduct conditional)
    By Leopold2000 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-16-2013, 03:27 PM
  2. Need help with Sumproduct and Weighted Average - File Attached
    By sachinattri in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-20-2013, 02:30 PM
  3. [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
  4. unique lists, sumproduct, weighted average
    By mattmuphy in forum Excel General
    Replies: 3
    Last Post: 04-23-2012, 04:00 PM
  5. Dollar Weighted Average Sumproduct Formula:
    By pipsturbo in forum Excel General
    Replies: 6
    Last Post: 12-07-2009, 07:13 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