+ Reply to Thread
Results 1 to 4 of 4

SUMPRODUCT #DIV/0! Error When Referencing Different Worksheet

  1. #1
    Registered User
    Join Date
    04-02-2015
    Location
    Miami, Florida
    MS-Off Ver
    2019
    Posts
    38

    SUMPRODUCT #DIV/0! Error When Referencing Different Worksheet

    I am using "=SUMPRODUCT((D2:D38<>"")/COUNTIF(D2:D38,D2:D38&""))" to generate a count of any cells with a numerical or text value in D2:D38, excluding duplicate and blank cells. This works fine as long as I use it in the same worksheet I am counting in. If I use that formula in a new worksheet, and try to generate a count from the original worksheet I end up with a divide by zero error. Here is the formula that produces an error, with 'Master List' being the name of the original worksheet:

    =SUMPRODUCT(('Master List'!D2:D38<>"")/COUNTIF('Master List'!D2:D38,D2:D38&""))

    Is there a problem with the syntax, or should is there a better formula to use?


    Thank you.

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: SUMPRODUCT #DIV/0! Error When Referencing Different Worksheet

    Try it like this

    =SUMPRODUCT(('Master List'!D2:D38<>"")/COUNTIF('Master List'!D2:D38,'Master List'!D2:D38&""))
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Registered User
    Join Date
    04-02-2015
    Location
    Miami, Florida
    MS-Off Ver
    2019
    Posts
    38

    Re: SUMPRODUCT #DIV/0! Error When Referencing Different Worksheet

    Perfect! Thank you! It was just a syntax error.

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: SUMPRODUCT #DIV/0! Error When Referencing Different Worksheet

    You're welcome. Please don't forget to thank those who helped by clicking on Add Reputation * and please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools-> Mark thread as Solved).

+ 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. [SOLVED] #VALUE! error when referencing a range on another worksheet
    By kar1179 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-11-2012, 02:26 AM
  2. button to copy worksheet with formulas referencing previous worksheet
    By Alexelius in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 07-28-2011, 09:40 AM
  3. Sumproduct Help - Referencing Text String
    By mrsogmax76 in forum Excel General
    Replies: 6
    Last Post: 04-08-2010, 01:06 PM
  4. Range error when referencing non active worksheet
    By SP in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-29-2005, 02:05 PM
  5. Error values:DIV/0! error in SumProduct formula with no division
    By Jerry W. Lewis in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 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