+ Reply to Thread
Results 1 to 4 of 4

SUMPRODUCT and COUNTIFS formula that is returning #DIV/0!

  1. #1
    Registered User
    Join Date
    01-07-2013
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    3

    SUMPRODUCT and COUNTIFS formula that is returning #DIV/0!

    Hello All,

    I am trying to input a fomula to calculate the amount of unique values based on two criteria. Please see attached spreadsheet for reference.

    If you look in cell D4 I have a formula that is calulating how many times cell C2 is showing on list M14 to M119. It is then looking for the amount of unique values from the destination column (G14 to G119) and returning that number to cell D4. Basically, it is calculating the amount of stops (unique destination location names) that are on a specific run.

    My issue is that if I were to extend the range to row 200 (this would include blank cells), I am getting a return value of (#DIV/0!) because it is calculating the blank cells as zero value.

    Please help!!!

    Thank you in advance for your assistance!!!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: SUMPRODUCT and COUNTIFS formula that is returning #DIV/0!

    Include iferror function
    Please Login or Register  to view this content.

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

    Re: SUMPRODUCT and COUNTIFS formula that is returning #DIV/0!

    This version will allow blank rows

    =SUMPRODUCT(($M$14:$M$200=C4)/COUNTIFS($M$14:$M$200,$M$14:$M$200,$G$14:$G$200,$G$14:$G$200&""))
    Audere est facere

  4. #4
    Registered User
    Join Date
    01-07-2013
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: SUMPRODUCT and COUNTIFS formula that is returning #DIV/0!

    The second formula works perfectly!!! Thank you so much!!!

+ 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