+ Reply to Thread
Results 1 to 4 of 4

Avoid #Div/0! in Sumproduct

  1. #1
    Registered User
    Join Date
    04-28-2004
    Posts
    13

    Avoid #Div/0! in Sumproduct

    How can I avoid a #DIV/0! error in the formula below when some (not all) of the data in column D will legitimately be zero?

    Cells A1-A5 = Don Hours
    Cells B1-B5 = Joe Hours
    Cells C1-C5 = Sue Hours
    Cells D1-D5 = Total Hours (SUM(A1:C1))
    Cells E1-E5 = Total Fee

    Formula = SUMPRODUCT(A1:A5*E1:E5/D1:D5)

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    =SUM(IF(D1:D5<>0,A1:A5*E1:E5/D1:D5))

    confirmed with CTRL+SHIFT+ENTER not just ENTER. You will see { } brackets appear.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    05-21-2004
    Location
    UK
    Posts
    136
    Why are you posting the same question twice?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by xld View Post
    Why are you posting the same question twice?
    I gave an infraction for this... Thanks, XLD

+ 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