+ Reply to Thread
Results 1 to 4 of 4

Eliminating and error in list and replacing it with above and below average

  1. #1
    Registered User
    Join Date
    07-12-2013
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    27

    Eliminating and error in list and replacing it with above and below average

    I have a list of values that is riddled with errors (#N/A). when I have formula's that reference values in the list it messes up my results. I want to eliminate the error and replace it with the average between the above and below value which i did figure out how to do. i.e. =IFERROR(Data!O12,(Data!O11+Data!O13)/2) .... "Data" is another worksheet that I am referencing. Where the problem lies when there is more than one error in a row. The formula finds the error but when there are two errors in a row, (Data!O11+Data!O13)/2) is using a cell with an error in to to add, and it just returns another error. I have been using many different logic statements, mainly nested IF AND functions but I am running into the same problem. i.e.

    =IF((IFERROR(Data!AD362,FALSE))<>FALSE,Data!AD362,IF(AND(IFERROR(Data!AD361,TRUE)=TRUE,IFERROR(Data!AD363,TRUE)=TRUE),0,(Data!AD361+Data!AD363)/2))

    or


    =IF((IFERROR(AD362,FALSE)=AD362),AD362,(IF((IFERROR(AD361,FALSE)=AD361),(IF(IFERROR(AD363,FALSE)=AD363,(AD361+AD363)/2,0)),0)))


    Let me know if anyone can figure this out, i'm sure its easy using a macro. I've attached the file.
    Forum Sep Wheat example.xlsx

  2. #2
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Eliminating and error in list and replacing it with above and below average

    I found this to be very confusing but took a "stab" at it.

    I think that this might be what you are looking for. If Data!AD362 has an error, (Data!AD361+Data!363)/2. If Data!AD362 doesn't have an error, 0.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  3. #3
    Registered User
    Join Date
    07-12-2013
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Eliminating and error in list and replacing it with above and below average

    First off, thank you for the response. Second off, its close, but not exactly what i'm looking for.........

    This is more what i'm looking for:

    If Data!AD362 has an error, and the cell above and below both have a value in it, then :, (Data!AD361+Data!363)/2. If Data!AD362 doesn't have an error, 0 not 0, but the origional value in the cell.

    So there are three different scenarios:
    1.) if no error keep its value
    2.) if there is an error and the above and below cell have a value, average them
    3.) if there is an error and either the cell above or below also has an error, set equal to zero

    I think the formula you had is almost correct, just need to alter it alittle

    Does that make sense?

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Eliminating and error in list and replacing it with above and below average

    If the formula is located in Data!AD362, you can't have a data value and a formula at the same time unless, the value in Data!AD362 is obtained by some other calculation that you haven't included. If that is the situation, then in Data!AD362 the formula would be something like:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If you could upload an Excel file for the problem, with the expected results, it would help.

+ 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] eliminating error message and search procedure
    By jamesjessie117 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2012, 07:28 PM
  2. [SOLVED] Eliminating numbers associated with a percentage in a list
    By khank in forum Excel General
    Replies: 4
    Last Post: 09-01-2012, 10:49 AM
  3. Replies: 15
    Last Post: 03-16-2012, 07:45 PM
  4. Eliminating blank cell from a list
    By promo786 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-25-2009, 12:38 PM
  5. Eliminating blank cells in a list on a ROW
    By grime in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-03-2005, 01:45 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