+ Reply to Thread
Results 1 to 5 of 5

SUMPRODUCT - where range has formula returned "" blank cells

  1. #1
    Valued Forum Contributor
    Join Date
    06-30-2005
    Location
    Verwood, Dorset, England
    MS-Off Ver
    Excel 2000
    Posts
    479

    SUMPRODUCT - where range has formula returned "" blank cells

    In the table below, the blank cell D1 is not an empty cell, but driven from a formula such as =IF(G2="","",G2)


    x y z x
    1 1 1
    2 1 3 3
    3 3 4 5

    When trying to use the formula =SUMPRODUCT((A2:D4)*(A1:D1="x")) I get #VALUE!

    Is there any way to make this calculation work and ignore the blank cells
    Last edited by Paul Sheppard; 08-16-2011 at 12:50 PM.
    Paul

  2. #2
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: SUMPRODUCT - where range has formula returned "" blank cells

    Part of the problem is the arrays in sumproduct need to have the same size and orientation. IE (A2:D4)*(B2:E4).

    Also, whenever you will be using logical comparisons and text, use -- before the first array:
    =SUMPRODUCT(--(
    If your question has been satisfactorily addressed, please consider marking it solved. Click the Thread Tools dropdown and select Mark thread as solved.
    Also, you might want to add to the user's reputation by clicking the star icon in the lower left corner of the post with the answer- it's why we do what we do...

    Thomas Lafferty
    Analyst/Programmer

  3. #3
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: SUMPRODUCT - where range has formula returned "" blank cells

    Here's one way:

    =SUMPRODUCT(VALUE(0&A2:D4)*(A1:D1="x"))
    Hope that helps,

    Colin

    RAD Excel Blog

  4. #4
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: SUMPRODUCT - where range has formula returned "" blank cells

    The simplest solution would be:

    Please Login or Register  to view this content.
    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  5. #5
    Valued Forum Contributor
    Join Date
    06-30-2005
    Location
    Verwood, Dorset, England
    MS-Off Ver
    Excel 2000
    Posts
    479

    Re: SUMPRODUCT - where range has formula returned "" blank cells

    Thanks Again Colin

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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