+ Reply to Thread
Results 1 to 13 of 13

sum and divide cells and have cells to turn to zero if #div/o! exist

  1. #1
    Registered User
    Join Date
    04-03-2014
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    10

    sum and divide cells and have cells to turn to zero if #div/o! exist

    I have cells that on occasion turns to #div/o! when dividing by zero. Is there a way on turning #div/o! to zero?

    How to re-write the formula to gain zero????

    =SUM(B91:E91)/G91

    big0

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: sum and divide cells and have cells to turn to zero if #div/o! exist

    Try

    =IF(G91=0,0,SUM(B91:E91)/G91)
    or
    =IFERROR(SUM(B91:E91)/G91,0)

  3. #3
    Registered User
    Join Date
    04-03-2014
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: sum and divide cells and have cells to turn to zero if #div/o! exist

    ok. this workes =IF(G91=0,0,SUM(B91:E91)/G91)
    but what does the second zero mean? G91=0,0

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: sum and divide cells and have cells to turn to zero if #div/o! exist

    The 2nd 0 is what the IF function returns if the expression (G91=0) is TRUE.

  5. #5
    Registered User
    Join Date
    04-03-2014
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: sum and divide cells and have cells to turn to zero if #div/o! exist

    ok. =I understand. Thx for your support

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: sum and divide cells and have cells to turn to zero if #div/o! exist

    You're welcome.

  7. #7
    Registered User
    Join Date
    04-03-2014
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: sum and divide cells and have cells to turn to zero if #div/o! exist

    one more ?.....This works =IF(G91=0,0,SUM(B91:E91)/G91), but need the zero to display 00:00, my bad

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: sum and divide cells and have cells to turn to zero if #div/o! exist

    Format the cell with the formula as a time hh:mm (or mm:ss depending on what your values are..)

  9. #9
    Registered User
    Join Date
    04-03-2014
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: sum and divide cells and have cells to turn to zero if #div/o! exist

    Yes. all of my cells were formated to mm:ss, prior to using the new formaula. For some reason, it looses its format and post 0.003472222 in lieu of showing mm:ss

    big0

  10. #10
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: sum and divide cells and have cells to turn to zero if #div/o! exist

    You need to format that column (that contains the formula) to mm:ss
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  11. #11
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: sum and divide cells and have cells to turn to zero if #div/o! exist

    Change the format of the cell with the formula back to mm:ss

  12. #12
    Registered User
    Join Date
    04-03-2014
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: sum and divide cells and have cells to turn to zero if #div/o! exist

    OK. It must of been me....it works thx for sticking with me.

  13. #13
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: sum and divide cells and have cells to turn to zero if #div/o! exist

    You're welcome.

+ 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. Replies: 2
    Last Post: 08-06-2013, 03:27 PM
  2. Turn zero-valued cells into blank cells while preserving link
    By ockidocki in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-22-2013, 08:21 AM
  3. Divide a given value into several cells
    By REHNGA in forum Excel General
    Replies: 3
    Last Post: 10-11-2008, 08:23 AM
  4. Divide all cells by 100
    By Tnesper in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-03-2008, 08:57 PM
  5. [SOLVED] average 2 cells (Mileage Divide by Gallons in two cells
    By dip43 in forum Excel General
    Replies: 1
    Last Post: 03-30-2006, 11:10 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