+ Reply to Thread
Results 1 to 20 of 20

IFERROR not (consistently) working

  1. #1
    Registered User
    Join Date
    04-25-2017
    Location
    Houston
    MS-Off Ver
    2016
    Posts
    10

    IFERROR not (consistently) working

    I have a fairly simple equation with an IFERROR function to calculate some currency ---> =IFERROR(K67+(K67*L67),"")

    If there is no input I want it to show nothing ("") and if there is input it shows the amount in dollars. That function works fine and comes back quite a bit in this sheet. Nevertheless, it stops working fine after line 66 so line 67 - which is just a copied version of the 66 one - does not show a blank (empty) cell but $0.00. Does anyone have an idea how this is possible? All functions are exactly the same.

    Working function ---------> =IFERROR(K60+(K60*L60),"")
    Not working function ----> =IFERROR(K67+(K67*L67),"")
    Last edited by John 1978; 04-25-2017 at 11:06 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: IFERROR not (consistently) working

    What is in cells K60, L60, K67, and L67?

    If you do arithmetic on an empty cell, it is interpreted as 0. So returning $0.00 seems perfectly normal to me. I would not expect your formula to encounter an error unless there is a non-numeric in K or L, or unless K or L contains a formula that returns blank.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    04-25-2017
    Location
    Houston
    MS-Off Ver
    2016
    Posts
    10

    Re: IFERROR not (consistently) working

    Cell K60 and K67 are now blank because they also contain an IFERROR function with a currency format. The L60 and L67 are e percentage cell but in this case also empty. The weird thing is that both lines 60 and 67 have the exact same content (empty) and formulas, but only from 60 down it's indicating $0.00 while the rest of the IFERROR (60 and up) show the requested empty cell.

  4. #4
    Registered User
    Join Date
    04-25-2017
    Location
    Houston
    MS-Off Ver
    2016
    Posts
    10

    Re: IFERROR not (consistently) working

    Quote Originally Posted by 6StringJazzer View Post
    What is in cells K60, L60, K67, and L67?

    If you do arithmetic on an empty cell, it is interpreted as 0. So returning $0.00 seems perfectly normal to me. I would not expect your formula to encounter an error unless there is a non-numeric in K or L, or unless K or L contains a formula that returns blank.


    Cell K60 and K67 are now blank because they also contain an IFERROR function with a currency format. The L60 and L67 are e percentage cell but in this case also empty. The weird thing is that both lines 60 and 67 have the exact same content (empty) and formulas, but only from 60 down it's indicating $0.00 while the rest of the IFERROR (60 and up) show the requested empty cell.

  5. #5
    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
    28,204

    Re: IFERROR not (consistently) working

    What do the IFERROR in K60 /K 67 return?

    Suggests cells are not empty but have a space.
    Last edited by JohnTopley; 04-25-2017 at 12:07 PM.

  6. #6
    Registered User
    Join Date
    04-25-2017
    Location
    Houston
    MS-Off Ver
    2016
    Posts
    10

    Re: IFERROR not (consistently) working

    Quote Originally Posted by JohnTopley View Post
    What do the IFERROR in K60 /K 67 return?

    Suggests cells are not empty but have a space.
    Yes, they are both empty so the IFERROR function here works fine for both.

  7. #7
    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
    28,204

    Re: IFERROR not (consistently) working

    This in K60 produced a result of "blank" (forcing an IFERROR condition)

    =IFERROR(VLOOKUP($C$2,$M$1:$N$6,2,0),"")

    this produced a result of 0

    =IFERROR(VLOOKUP($C$2,$M$1:$N$6,2,0),0)

    with the formula

    =IFERROR(K60+(K60*L60),"")

  8. #8
    Registered User
    Join Date
    04-25-2017
    Location
    Houston
    MS-Off Ver
    2016
    Posts
    10

    Re: IFERROR not (consistently) working

    Let me just give you all the data so you can reproduce my calculation and check what your result is of you keep the cells all blank...

    The 'problem' cell has a format 'currency' with the formula: =IFERROR(K60+(K60*L60),"")
    Cell K60 (blank) has a format 'currency' with the formula: =IFERROR(F60*G60*I60,"")
    Cell L60 (blank) has a format 'percentage' and is a cell where you insert a percentage
    Cell F60 (blank) has a format 'general' and is just a cell where you insert an amount (quantity in this case)
    Cell G60 (blank) has a format 'general' and is just a cell where you insert an amount (duration in this case)
    Cell I60 (blank) has a format 'currency' and is a cell where a lookup function inserts an amount (price in this case). I think if you just leave this as an empty cell with currency format you'll be fine.

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

    Re: IFERROR not (consistently) working

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  10. #10
    Registered User
    Join Date
    04-25-2017
    Location
    Houston
    MS-Off Ver
    2016
    Posts
    10

    Re: IFERROR not (consistently) working

    Quote Originally Posted by sandy666 View Post
    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    The example file does show the zero's
    Green is what you put in and red the calc. But if you look at the screenshot you see the upper columns empty while containing the same IFERROR funtion to keep them empty when not used.

    There is only one difference I just noticed and contains the solution; cell I60 contains an IFERROR and lookup function and cell I67 is a cell where you have to do the input yourself by punching in a number.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by John 1978; 04-25-2017 at 12:52 PM.

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

    Re: IFERROR not (consistently) working

    Use on these cells Home-Editing-Clear-Clear All and check again
    picture is useless because nobody can check or reproduce error(s)

  12. #12
    Registered User
    Join Date
    04-25-2017
    Location
    Houston
    MS-Off Ver
    2016
    Posts
    10

    Re: IFERROR not (consistently) working

    Quote Originally Posted by sandy666 View Post
    Use on these cells Home-Editing-Clear-Clear All and check again
    picture is useless because nobody can check or reproduce error(s)
    Nop, no success with clear all...

    I might have to come up with another formula for these cells to hide the zero when the data cells are empty
    Last edited by John 1978; 04-25-2017 at 01:04 PM.

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

    Re: IFERROR not (consistently) working

    so attach your original workbook after delete all confident data but leave everything what is necessary for your formula(s)
    Like on picture.

  14. #14
    Registered User
    Join Date
    04-25-2017
    Location
    Houston
    MS-Off Ver
    2016
    Posts
    10

    Re: IFERROR not (consistently) working

    I got it! I fixed the problem with custom cell format by punching in the code 0.00;-0;"" and that works.

    Thank you for the help Sandra and check out the workbook
    Attached Images Attached Images
    Attached Files Attached Files

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

    Re: IFERROR not (consistently) working

    You are welcome
    (sandy not sandra )
    so
    02repsolv.gif

  16. #16
    Registered User
    Join Date
    04-25-2017
    Location
    Houston
    MS-Off Ver
    2016
    Posts
    10

    Re: IFERROR not (consistently) working

    Quote Originally Posted by sandy666 View Post
    You are welcome
    (sandy not sandra )
    so
    Attachment 514690
    Thank you Sandy!

    Oh, and the code is not 0.00;-0;"" but $0.00;-0;"" Otherwise the dollar sign wont show

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

    Re: IFERROR not (consistently) working

    That's ok but mark thread as SOLVED from Thread Tools because most of the people looking for solutions in threads labeled as SOLVED

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

    Re: IFERROR not (consistently) working

    If you want the root cause of your issue, here is what was happening.
    In some of your earlier cells, you were using
    =IFERROR(VLOOKUP($C$2,$M$1:$N$6,2,0),"")
    This does not produce a "Blank" cell. If you use the formula =ISBLANK(K62), it will come up false. It is a null set and excel sees it as text. (=ISTEXT(K62) = TRUE). When you try to add or multiply text, you get an error so the IFERROR function takes over and you get "" in your cell.
    If the cell is really blank or is 0, then the arithmetic works perfectly and you get a result of 0, not an error.

    Since you don't seem to want zero's or errors, one way to fix your problem would be with this equation

    =IFERROR(1/(1/(K60+(K60*L60))),"")
    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

  19. #19
    Registered User
    Join Date
    04-25-2017
    Location
    Houston
    MS-Off Ver
    2016
    Posts
    10

    Re: IFERROR not (consistently) working

    Quote Originally Posted by ChemistB View Post
    If you want the root cause of your issue, here is what was happening.
    In some of your earlier cells, you were using
    =IFERROR(VLOOKUP($C$2,$M$1:$N$6,2,0),"")
    This does not produce a "Blank" cell. If you use the formula =ISBLANK(K62), it will come up false. It is a null set and excel sees it as text. (=ISTEXT(K62) = TRUE). When you try to add or multiply text, you get an error so the IFERROR function takes over and you get "" in your cell.
    If the cell is really blank or is 0, then the arithmetic works perfectly and you get a result of 0, not an error.

    Since you don't seem to want zero's or errors, one way to fix your problem would be with this equation

    =IFERROR(1/(1/(K60+(K60*L60))),"")
    Thank you for this explanation and corrected equation ChemistB! I tried this and works perfectly fine too...

    Have the thread on SOLVED now with two solutions for this problem.

  20. #20
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: IFERROR not (consistently) working

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    http://www.msofficeforums.com/excel/...y-working.html

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

+ 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. Private is not working consistently
    By rhouston08 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-24-2016, 12:44 PM
  2. [SOLVED] Conditional Formatting not Working Consistently
    By endly in forum Excel General
    Replies: 5
    Last Post: 06-30-2015, 09:18 PM
  3. [SOLVED] =IF formula not working consistently
    By kazphilips in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-12-2014, 03:19 PM
  4. [SOLVED] COUNTIF not working consistently
    By bishoposiris in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-22-2014, 11:09 AM
  5. [SOLVED] *COUNTIF with nested AND/OR -- not consistently working
    By RandomRed in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-31-2014, 10:26 AM
  6. [SOLVED] VLookup not working consistently
    By pjw23 in forum Excel General
    Replies: 2
    Last Post: 04-27-2012, 03:45 PM
  7. Conditional Formatting Not Working Consistently
    By Christina in forum Excel General
    Replies: 6
    Last Post: 07-22-2005, 07:05 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