+ Reply to Thread
Results 1 to 4 of 4

if answer is #DIV/0! or a negative, how to make it 0?

  1. #1
    Registered User
    Join Date
    06-12-2015
    Location
    Madison WI
    MS-Off Ver
    2010
    Posts
    52

    if answer is #DIV/0! or a negative, how to make it 0?

    in a cell in excel, i use this formula: =SUM(1-Q4-M11/L15)

    sometimes the answer is #DIV/0! or it's a negative. I understand why, but on those occasions, I'd like it to then populate as a 0 (zero) or blank so the other formulas relying on the data from that cell can still populate. Is that possible?

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,679

    Re: if answer is #DIV/0! or a negative, how to make it 0?

    =IFERROR(SUM(1-Q4-M11/L15),0)

    or

    =IFERROR(SUM(1-Q4-M11/L15),"")

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

    Re: if answer is #DIV/0! or a negative, how to make it 0?

    Maybe

    =IF(L15=0,0,MAX(SUM(1-Q4-M11/L15),0))
    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

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: if answer is #DIV/0! or a negative, how to make it 0?

    Try this:

    =IF(L15=0,0,MAX(0,1-Q4-M11/L15))

    This assumes that Q4 and M11 do not contain error values.

    Hope this helps.

    Pete

+ 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. Escalating Commission Structure - Want negative answer to return as 0.
    By captaincrayola in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-11-2013, 09:57 PM
  2. [SOLVED] Subtracting text boxes from one another doesn't work if answer is negative.
    By colvinb in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 07-19-2012, 06:26 AM
  3. msgbox for negative answer and how to determine the number of significant digits
    By bmr8002 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-06-2012, 08:56 PM
  4. Multiply values make up a cell answer
    By riyo91 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-05-2010, 05:56 AM
  5. Replies: 5
    Last Post: 05-12-2009, 04:47 PM
  6. How Do I Get To Make My Answer Blank For #ref! ErroR?
    By all4excel in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-31-2007, 07:46 AM
  7. Need help with formula to give 0 if value is negative or answer is
    By Sharona77 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-01-2006, 04:45 PM
  8. how do i add 2 columns to make the answer apper on the 3rd column
    By merrymeet2u in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-31-2006, 12:10 PM

Tags for this Thread

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