+ Reply to Thread
Results 1 to 8 of 8

using "if" and #div/0! in nesting environment gives error

  1. #1
    Forum Contributor
    Join Date
    06-24-2012
    Location
    Australia
    MS-Off Ver
    Office365
    Posts
    302

    using "if" and #div/0! in nesting environment gives error

    Hi Experts,

    using "if" and #div/0! in nesting environment , unable to overcome the errors as not experienced in nesting commands.

    In following unable to put "iferr"

    IF((D3-C3)/C3%<=10%,"-10%","")

    Please see sample excel file


    Thanks in advance,
    Karnik
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: using "if" and #div/0! in nesting environment gives error

    SAee if this will get you started...
    =IF(C3=0,"",IF((D3-C3)/C3%<=10%,-10%,""))

    Note also that I removed the "" from the *10%......using "" converts it to text
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    06-24-2012
    Location
    Australia
    MS-Off Ver
    Office365
    Posts
    302

    Re: using "if" and #div/0! in nesting environment gives error

    Hi FDibbins,
    Thanks once again rescuing me!
    Cheers
    Karnik

  4. #4
    Forum Contributor
    Join Date
    06-24-2012
    Location
    Australia
    MS-Off Ver
    Office365
    Posts
    302

    Re: using "if" and #div/0! in nesting environment gives error

    Hi FDibbins,

    I am back!
    Some exceptions to data in function suggested by you is as follows:

    F(E2=0,"",IF((E2-D2)/D2>=20%,20%,""))

    This works well if value in E2=0 BUT if E2 has some amount and D2=0, it givens #Div/0!. For majority data in column D has>1 so it works; large amount column D=0, it results #Div/0!

    Attempted few permutation& combination using IF/OR....but no solution; I currently use filter and change manually

    I am back too square one!

    Please guide,

    Thanks
    Karnik

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

    Re: using "if" and #div/0! in nesting environment gives error

    If you're dividing by zero Excel will give you that error message. if you want it to be blank then use this:

    =iferror(iF(E2=0,"",IF((E2-D2)/D2>=20%,20%,"")),"")

    If that's not what you want, please explain what you DO want.
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  6. #6
    Forum Contributor
    Join Date
    06-24-2012
    Location
    Australia
    MS-Off Ver
    Office365
    Posts
    302

    Re: using "if" and #div/0! in nesting environment gives error

    Hi Glenn,
    Thanks, in the past you have helped me.
    Thanks for enlightening iserr and iserror difference here!

    Cheers
    Karnik

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

    Re: using "if" and #div/0! in nesting environment gives error

    Yes, I remember your "Name". glad to have helped.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: using "if" and #div/0! in nesting environment gives error

    Happy to help and thanks for the rep.

    Glenn, thanks for the assist

+ 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] Nesting "IF" with "Match" and "Large"
    By sherman51 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-22-2016, 07:58 AM
  2. Replies: 35
    Last Post: 01-13-2016, 02:16 AM
  3. = EMBED("Forms.ComboBox.1","") error "Reference not valid."
    By CatharinaCatharina in forum Excel General
    Replies: 2
    Last Post: 12-11-2014, 09:58 AM
  4. [SOLVED] If Not ActiveSheet.Range("A1").Value Like "apple" Then MsgBox "Error"
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-18-2014, 02:16 PM
  5. Nested IFs and error message "uses more levels of nesting than allowed"
    By pannassi in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-09-2012, 11:48 AM
  6. [SOLVED] How to Count number of "Error" and "OK" after the word "Instrument" found in table row
    By eltonlaw in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2012, 06:26 AM
  7. [SOLVED] What is Error "Method "Paste" of object "_Worksheet" failed?
    By vat in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-17-2006, 04: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