+ Reply to Thread
Results 1 to 5 of 5

Problem with blank cells affecting formula

  1. #1
    Forum Contributor
    Join Date
    09-17-2009
    Location
    Torquay, England
    MS-Off Ver
    Excel 2013
    Posts
    253

    Problem with blank cells affecting formula

    Hi,

    =(SUMPRODUCT((D6:D300="a")*(F6:F300="MATT")*(J6:J300)))

    Count all A's that are also Matt and add up the corresponding figs in J

    If use the formula above to 179 (where there are values in the cells) then I get the answer 170 which is correct.

    Currently with the it set to review all cells from 6 to 300 which includes blanks then it returns #value therfore I assume it is not coping with the blank cells.

    How do I get around this?

    Thanks in advance
    Last edited by Gooford; 09-30-2009 at 06:50 AM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Problem with blank cells affecting formula

    can you post a data sample?

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Problem with blank cells affecting formula

    Sounds like your blanks in J are actually nulls so possibly revert to double unary:

    =SUMPRODUCT(--(D6:D300="a"),--(F6:F300="MATT"),J6:J300)

    Using the * method you are explicitly coercing the values in J to numbers, if J blanks are Nulls (0 length text string) then this will generate #VALUE! whereas the alternative approach will ignore non-numerics in the final range.
    Last edited by DonkeyOte; 09-30-2009 at 06:21 AM. Reason: added error explanation

  4. #4
    Forum Contributor
    Join Date
    09-17-2009
    Location
    Torquay, England
    MS-Off Ver
    Excel 2013
    Posts
    253

    Re: Problem with blank cells affecting formula

    Great - I will have a go and let you know the result.

  5. #5
    Forum Contributor
    Join Date
    09-17-2009
    Location
    Torquay, England
    MS-Off Ver
    Excel 2013
    Posts
    253

    Re: Problem with blank cells affecting formula

    Brilliant thanks very much

    Also, Teylyn, thanks I was going to upload an example but its solved now

+ 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