+ Reply to Thread
Results 1 to 5 of 5

Max, Min, Avg of a range containing some #NA

Hybrid View

  1. #1
    Registered User
    Join Date
    12-11-2003
    Posts
    14

    Question Max, Min, Avg of a range containing some #NA

    Hi all,
    I have a little problem to solve...
    I have a range with 2000 cells (let's say A1:A2000) and it contains some #NA
    If doing MAX(A1:A2000) it returns #NA

    How can I have a result that does not take the incorrect values into account ?

    Thanks to all !!

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    =MAX(IF(ISERROR(A1:A2000),"",A1:A2000))

    press control + shift + enter

    - Mangesh

  3. #3
    Registered User
    Join Date
    12-11-2003
    Posts
    14
    Thanks a lot.
    The only problem is that if you select a range longer than the real one, a MIN will return 0 (even if you have oonly positive values) as an empty cell is considered as null

  4. #4
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    =MIN(IF(ISERROR(A1:A5),"",IF(ISBLANK(A1:A5),"",A1:A5)))

    - Mangesh

  5. #5
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Another way...

    Maximum:

    =MAX(IF(ISNUMBER(A1:A10),A1:A10))

    Minimum:

    =MIN(IF(ISNUMBER(A1:A10),A1:A10))

    Minimum, excluding zero values:

    =MIN(IF((ISNUMBER(A1:A10)),IF(A1:A10>0,A1:A10)))

    These formula need to be confirmed with CONTROL+SHIFT+ENTER.

    Hope this helps!

+ 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