+ Reply to Thread
Results 1 to 9 of 9

IFERROR problem

  1. #1
    Registered User
    Join Date
    08-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    10

    IFERROR problem

    Hello, here is the problem I am facing:

    I have a worksheet with 2500 rows of data called MaterialsIndex, with the last column being a $ amount stemming from a calculation based on row contents. After the last column of data, I have =IF(J12>0,K11+1,K11) in the top row's cell, copied all the way to the bottom of the data.

    In a separate sheet that summarizes the data, I have

    =IFERROR(INDEX(MaterialsIndex!$A$2:$J$10,MATCH(ROW(J1),MaterialsIndex!$K$2:$K$10,0),COLUMN(J1)),"")

    Copied across the columns, and then copied down the rows. The objective is to dump the contents of the rows from the Data sheet in to the summary sheet if the contents of the last cell > 0.

    Problem: It only works for 8 rows, afterward all cells in the summary are blank despite having the IFERROR formula. WHy does it stop working?!

    Any help is appreciated....thanks!
    John

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: IFERROR problem

    What happens if you take the IFERROR out of the formula?

    What happens if you watch the formula evaluate using the Evaluate Formula button?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    08-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    10

    Re: IFERROR problem

    On the last working cell / row, the second evaluation reads:

    =IFERROR(INDEX(MaterialsIndex!$A$2:$J$10,MATCH(7,MaterialsIndex!$K$2:$K$10,0),COLUMN(J7))"")

    And the third evaluation reads:

    =IFERROR(INDEX(MaterialsIndex!$A$2:$J$10,9,COLUMN(J7))"")



    On the first cell / row that doesn't work, the second evaluation reads:

    =IFERROR(INDEX(MaterialsIndex!$A$2:$J$10,MATCH(8,MaterialsIndex!$K$2:$K$10,0),COLUMN(J8))"")

    And the third reads:

    =IFERROR(INDEX(MaterialsIndex!$A$2:$J$10,#NA,COLUMN(J8))"")


    I don't know why the #NA as it is in the cell it needs to be in. Any ideas?
    thanks,
    John

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: IFERROR problem

    Yes: The exact number 8 doesn't appear in K2:K10.

  5. #5
    Registered User
    Join Date
    08-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    10

    Re: IFERROR problem

    I am stumped. The spreadsheet is attached, the two far right worksheets are the ones in question - Materials Summary, and Materials Index. The sheet 'Tubing' is the one I've been testing with and again can't make it past 8 rows. Any assistance is appreciated - thanks a lot!!
    John
    Attached Files Attached Files

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

    Re: IFERROR problem

    It's failing because of this part
    MATCH(ROW(B1),MaterialsIndex!$K$2:$K$10,0)
    You have that in B4
    As you fill down, it changes to
    MATCH(ROW(B2),MaterialsIndex!$K$2:$K$10,0)
    MATCH(ROW(B3),MaterialsIndex!$K$2:$K$10,0)
    MATCH(ROW(B4),MaterialsIndex!$K$2:$K$10,0)
    etc...

    When you get to
    MATCH(ROW(B8),MaterialsIndex!$K$2:$K$10,0)
    ROW(B8) = 8
    So it's
    MATCH(8,MaterialsIndex!$K$2:$K$10,0)

    The number 8 does not exist in MaterialsIndex!$K$2:$K$10
    So therefore the match returns #N/A
    And the IFERROR captures that and returns ""


    I think you just need to extend your ranges beyond row 10
    =IFERROR(INDEX(MaterialsIndex!$A$2:$J$1000,MATCH(ROW(B1),MaterialsIndex!$K$2:$K$1000,0),COLUMN(B1)),"")



    But looking over the formula some more...
    Why not just put this in MaterialSummary B4
    =MaterialsIndex!B3
    And fill down/right

  7. #7
    Registered User
    Join Date
    08-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    10

    Re: IFERROR problem

    thanks a lot - the IFERROR works. I only want data if column J in MaterialsIndex has a value >0.

    thanks again, and if you have a more direct and reliable formula I welcome the feedback.
    cheers,
    John

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: IFERROR problem

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

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

    Re: IFERROR problem

    Quote Originally Posted by johnhasaquestion View Post
    I only want data if column J in MaterialsIndex has a value >0.
    In MaterialsSummary A4 and filled down/right as far as needed..

    =IF(MaterialsIndex!$J3>0,MaterialsIndex!A3,"")

+ 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. IFERROR problem
    By astole in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-30-2013, 04:31 AM
  2. xlfn.IFERROR or IFERROR don't work in Excel 98-2003
    By dj_danu01 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2013, 02:53 AM
  3. [SOLVED] IFERROR problem
    By wdan57 in forum Excel General
    Replies: 2
    Last Post: 05-24-2013, 11:45 AM
  4. [SOLVED] Max/Min IfError Problem
    By Montoro22 in forum Excel General
    Replies: 10
    Last Post: 08-07-2012, 02:33 PM
  5. Syntax Iferror Problem
    By benno87 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-01-2009, 12:09 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