+ Reply to Thread
Results 1 to 9 of 9

Excel does not return a DIV/0 error although a cell is blank

  1. #1
    Registered User
    Join Date
    05-08-2023
    Location
    Utrecht, Netherlands
    MS-Off Ver
    Excel 2021
    Posts
    3

    Excel does not return a DIV/0 error although a cell is blank

    I am trying to calculate a certain score in Excel, with the formula:
    =0,012*(U2/R2)
    Cell U2 contains nothing (blank)
    Cell R2 contains 521993

    Excel does not return an error, but returns a 0. This means that when I extend the formula, a wrong number will be returned. I need an error, just as Excel would normally give you. To enlighten you further, I attached a screenshot below.

    Image1.png

    Hopefully, someone has an idea what is going on. I feel like I am going mad.

    All the best,

    Guus Bronkhorst
    Last edited by guusb99; 05-08-2023 at 11:44 AM.

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Excel does not return a DIV/0 error although a cell is blank

    if R2 will be 0 you'll get DIV/0

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,536

    Re: Excel does not return a DIV/0 error although a cell is blank

    Try this:

    =IF(U2="";"#N/A";0,012*(U2/R2))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Excel does not return a DIV/0 error although a cell is blank

    Zero divided by any number is still zero!!

    If you want (and it is mathematically incorrect) to coerce excel to return an error:

    =0.0012*(1/(1/U2))/R2
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  5. #5
    Registered User
    Join Date
    05-08-2023
    Location
    Utrecht, Netherlands
    MS-Off Ver
    Excel 2021
    Posts
    3

    Re: Excel does not return a DIV/0 error although a cell is blank

    Thanks for all your responses. I should've fully explained my problem.

    The formula I am trying to calculate is =0,012*(U2/R2)+0,014*(N2/R2)+0,033*(F2/R2)+0,006*(J2/AK2)+0,999*(K2/R2)

    However, when there is a value missing (blank) in any of the cells, I want Excel to return nothing, as the calculation will not be correct anymore in that case. How could I do that?

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,536

    Re: Excel does not return a DIV/0 error although a cell is blank

    You'd need to preceed the formula with a check, e.g.

    =IF(OR(U2="";N2="";F2="";J2="",K2="");"";formula)

  7. #7
    Registered User
    Join Date
    05-08-2023
    Location
    Utrecht, Netherlands
    MS-Off Ver
    Excel 2021
    Posts
    3

    Re: Excel does not return a DIV/0 error although a cell is blank

    That is incredible. Thank you so much for your help!

    P.S. I am a beginner in Excel, so your help is very much appreciated.
    Last edited by AliGW; 05-08-2023 at 11:45 AM. Reason: Please do NOT quote unnecessarily!

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,536

    Re: Excel does not return a DIV/0 error although a cell is blank

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2503
    Posts
    13,702

    Re: Excel does not return a DIV/0 error although a cell is blank

    Welcome to the forum, guusb99.

    While you are at it please double check your Profile information ... especially regarding the MS-Off Ver:

    Is your forum profile showing the Excel PRODUCT that you need this request to work with?

    The best solutions often rely on knowing WHICH Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date. If you aren't sure, in Excel go to File/Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this.

    The three most recent Excel PRODUCTS are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the Version number in your profile (e.g. MS365 (PC) Version 2211). The version number is in the About Excel section further down the Account page.

    Thank you ahead of time and once again, welcome to the forum.
    Dave

+ 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] I have a formula in excel and want it to return blank if ref cell is blank and not "0"
    By Schwartz_Warehouse in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-22-2021, 03:54 PM
  2. Return first non blank cell (cells have formulas that return blank)
    By BG1983 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-05-2016, 04:06 PM
  3. Replies: 3
    Last Post: 06-19-2015, 02:56 PM
  4. [SOLVED] Getting Excel to return a blank field regardless of cell formatting
    By lukela85 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-26-2013, 03:03 PM
  5. Excel 2007 : IF function to return blank cell
    By jayb in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-15-2013, 04:28 AM
  6. Replies: 2
    Last Post: 09-25-2012, 01:48 PM
  7. [SOLVED] Excel formula to return a blank cell
    By MrT in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-18-2006, 04:50 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