+ Reply to Thread
Results 1 to 5 of 5

Removing #DIV/0!

  1. #1
    Registered User
    Join Date
    04-16-2008
    Posts
    63

    Removing #DIV/0!

    Hello I have a formula in a workbook that keeps giving me #DIV/0! no matter what I do.
    I am trying to total up a column of numbers with no luck.
    If I enter into B28 the following formula : =SUM(D4*E4)+(D5*E5)+(D6*E6)+(D7*E7)+(D8*E8)+(D9*E9)+(D10*E10)+(D11*E11)+(D12*E12)+(D13*E13)+(D14*E14)+(D15*E15)+(D16*E16)+(D17*E17)+(D18*E18)+(D19*E19)+(D20*E20)+(D21*E21)+(D22*E22)+(D23*E23)+(D24*E24)
    it does not give me the #DIV/0! but the result is incorrect.

    what I need is a formula that totals rows 4 through 24 but the formula for each row individually would be =(d4/b4*e4) but I am trying to avoid having to add multiple extra columns (& clutter) for each item in each row that I need to calculate.

    I have attached the workbook so that you can see what I am trying to do.

    Any suggestions would be appreciated.

    Thanks & Happy Holidays!
    Attached Files Attached Files
    Last edited by lnjr; 12-16-2008 at 10:17 AM. Reason: SOLVED

  2. #2
    Forum Contributor Kieran's Avatar
    Join Date
    10-02-2003
    Location
    Perth, Western Australia
    MS-Off Ver
    Office 2003
    Posts
    109
    It all worked fine with this formula . =IF(B4>0,SUM($D4/$B4)*E4,"")
    paste into L4 and copy down to L24. Then copy the formula across to column R ina simialar fashion.
    Kieran

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,719
    To do everything in one formula try

    =SUM(IF(B4:B24,D4:D24/B4:B24*E4:E24))

    This is an array formula which needs to be confirmed with CTRL+SHIFT+ENTER. To do that paste formula into cell then press F2 key, hold down CTRL and SHIFT keys and press ENTER so that curly braces like { and } appear around formula in formula bar

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    In B25: =SUM(IF(B4:B24 <>0, D4:D24 / B4:B24 * E4:E24))

    This is an array formula, meaning it MUST be confirmed with Ctrl+Shift+Enter, not just Enter. (With the cursor in the formula bar, hold down Ctrl and Shift, then press Enter.) You'll know you did it correctly if curly braces appear around the formula in the Formula Bar; you cannot type in the braces directly.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    04-16-2008
    Posts
    63
    Thanks (daddylonglegs & shg) for the help/suggestions. That resolved my problem.

    I also appreciate the suggestion for a formula from Kieran but I was not having a problem with that section. In fact I was trying to eliminate having to use columns L thru R (for less clutter on the page)

    Thanks Everyone. It is Greatly Appreciated.

    Have a Wonderful Holiday Season
    Last edited by lnjr; 12-16-2008 at 10:07 AM.

+ 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