+ Reply to Thread
Results 1 to 11 of 11

Max/Min IfError Problem

  1. #1
    Registered User
    Join Date
    07-05-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2010
    Posts
    57

    Max/Min IfError Problem

    Hello,

    I'm trying to put in a formula to return the highest number but the problem is that I have a vlookup function providing the values for the range im pulling the max from. Therefor every so often it will return #DIV/0! So I currently have a max and iferror combined formula that looks as follows:

    {=MAX(IF(ISERROR(I2:I44), "", I2:I44))} and the same thing with min and average.

    But the problem is that I want to drag the formula down so when i put new entries in it will calculate them too. But sense I have the iferror formula it is taking into account the blank cells and counting them as zeros I believe and throwing off the number. Any idea for a formula that still won't count blank cells as zeros but keep those with the error in them to be counted as zero?

    Thanks it's much appreciated,

    Rob

  2. #2
    Registered User
    Join Date
    04-20-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2013, 2010, 2007, 2003
    Posts
    99

    Re: Max/Min IfError Problem

    instead of using IF and ISERROR, use IFERROR

    =IFERROR(MAX(I2:I144),"")
    SPARTAN
    Please click the * if my solution helped

  3. #3
    Registered User
    Join Date
    07-05-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Max/Min IfError Problem

    Actually is there anyway I could have it ignore the error's in the calculations as if they were blanks?

    ---------- Post added at 01:57 PM ---------- Previous post was at 01:52 PM ----------

    For the Min function that is

  4. #4
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Max/Min IfError Problem

    how about the following array / CSE formulae?

    =MAX(IFERROR(A1:A10,0))

    and

    =MIN(IFERROR(A1:A10,9^9))
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Max/Min IfError Problem

    Do you mean a formula like:

    =IF(COUNT(I2:I44),AVERAGE(I2:I144),"")
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Max/Min IfError Problem

    Perhaps investigate the AGGREGATE function (available in Excel 2010 only), e.g.

    =AGGREGATE(4,6,I2:I44)

    4 denotes MAX, 6 tells it to ignore errors, blanks will also be ignored (not treated as zeroes). Change the 4 to 5 for MIN and 1 for AVERAGE
    Audere est facere

  7. #7
    Registered User
    Join Date
    07-05-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Max/Min IfError Problem

    NBVC, the formula is good but for the columns where there are errors in them like #DIV/0!, it returns that for the average

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Max/Min IfError Problem

    Why are there Div/0 errors in those columns? You should get rid of them at source... adding error handler to formulas there....

  9. #9
    Registered User
    Join Date
    07-05-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Max/Min IfError Problem

    ^Daddylonglegs that works perfect, thanks so much!

    NVBC, how do you do error handlers?

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Max/Min IfError Problem

    using functions like IFERROR(), ISNA(), etc are error handlers....

  11. #11
    Registered User
    Join Date
    07-05-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Max/Min IfError Problem

    Gotcha okay thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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