+ Reply to Thread
Results 1 to 5 of 5

Nesting IFERROR and IF statements

  1. #1
    Registered User
    Join Date
    07-21-2014
    Location
    Montana
    MS-Off Ver
    2013
    Posts
    12

    Nesting IFERROR and IF statements

    I am trying to combine two different IFERROR statements with one if statement and am getting a #VALUE! error. Each of the three statements work fine by themselves, but I am having difficulty combining them into one.

    The three individual statements are:
    1. =IF(I2="MN-5536",30966,"")
    2. =IFERROR(IF(VLOOKUP(I4,'Sheet2'!L:L,1,FALSE)=I4,""),"ENTER SUPPLIER #")
    3. =IFERROR(IF(VLOOKUP(I10,'Sheet2'!$E$2:$G$65,1,FALSE)=I10,IF(S10<>"","enter supplier #")),"")

    I have combined them into the below, but get a #VALUE! error.
    =IF(I2="MN-5536",30966,IF(IFERROR(IF(VLOOKUP(I2,'Sheet2'!$E$2:$G$65,1,FALSE)=I2,IF(S2<>"","enter supplier #")),""),IF(IFERROR(IF(VLOOKUP(I2,'Sheet2'!L:L,1,FALSE)=I2,""),"ENTER SUPPLIER #"),"")))

    Not sure if you would need to know the detail behind each function since they work fine individually. Let me know and I'll provide more detail if needed.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Nesting IFERROR and IF statements

    Have you tried using the Evaluate button (Fx) on the Formulas ribbon to set through the calculation step by step?
    Martin

  3. #3
    Registered User
    Join Date
    07-21-2014
    Location
    Montana
    MS-Off Ver
    2013
    Posts
    12

    Re: Nesting IFERROR and IF statements

    No I have not. I have not been able to use that successfully when there are multiple levels to a function.

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

    Re: Nesting IFERROR and IF statements

    It's really impossible for us to combine the 3 formulas into one without more information.
    We don't know which formula is referring to which of the other formulas.

    Given #1 and #2
    1. =IF(I2="MN-5536",30966,"")
    2. =IFERROR(IF(VLOOKUP(I4,'Sheet2'!L:L,1,FALSE)=I4,""),"ENTER SUPPLIER #")

    Is #1 referring to I2 whcih contains #2?
    Or is #2 referring to I4 which contains #1?

    you listed 1 2 and 3.
    Can you also include which cell each of the 3 formulas is in?
    That way we can see how they go together.

    Or better yet, post a sample workbook.

    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 use the paperclip icon to open the upload window.

    View Pic

  5. #5
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Nesting IFERROR and IF statements

    I would have said that the evaluate functionality is at its most useful when a function has multiple levels. The trick is to take it step by step and look at which segment of the function is underlined as this with be the next segment to be evaluated. Sooner or later, a segment will evaluate to an error which will allow you to focus on the part causing the problem.

    An alternative is to highlight a segment inthe formula bar and hit F9 to evaluate just that segment.

+ 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: 4
    Last Post: 07-02-2013, 09:47 PM
  2. Replies: 2
    Last Post: 06-12-2012, 04:50 PM
  3. Replies: 2
    Last Post: 01-11-2010, 07:37 AM
  4. Nesting more than 7 If Statements, need help
    By Padgoi in forum Excel General
    Replies: 7
    Last Post: 10-24-2008, 11:55 AM
  5. Nesting If statements
    By Smitty14 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-05-2008, 10:47 AM

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