+ Reply to Thread
Results 1 to 11 of 11

MIN function, ignore blanks and errors, not a continuous range...

  1. #1
    Registered User
    Join Date
    09-23-2007
    Posts
    54

    MIN function, ignore blanks and errors, not a continuous range...

    Hi,

    I want to take the MIN of several multiplied cell contents that are not in a range, and have it ignore results that are not numeric. So:

    =MIN(E138*F138,G138*I138,J138*L138,M138*P138)

    ...is returning 0 because G138 is empty. If I try to put a character in that cell, the result is #VALUE!. Most Array solutions I see out there require a continuous range to work. Maybe a CountIf can work? I'm just not sure what approach to use here.

    Any help appreciated. Thanks in advance

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: MIN function, ignore blanks and errors, not a continuous range...

    You get better help on your question if you add a small excel file, without confidential information.

    Please also add manualy the expected result in your file.

    To Attach a File:

    1. Scroll down to the window below your post Additional Options
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: MIN function, ignore blanks and errors, not a continuous range...

    May be:
    =MIN(IF(E138*F138=0,10^10,E138*F138),IF(G138*I138=0,10^10,G138*I138),IF(J138*L138=0,10^10,J138*L138),IF(M138*P138=0,10^10,M138*P138))
    Quang PT

  4. #4
    Registered User
    Join Date
    09-23-2007
    Posts
    54

    Re: MIN function, ignore blanks and errors, not a continuous range...

    Thank you very much. And for the MAX side of it, I'll use -10^10. My data will never break those bounds. Thanks for being so quick!

  5. #5
    Registered User
    Join Date
    09-23-2007
    Posts
    54

    Re: MIN function, ignore blanks and errors, not a continuous range...

    Actually, the MAX equation wants -(10^10):

    =MAX(IF(E155*F155=0,-(10^10),E155*F155),IF(G155*I155=0,-(10^10),G155*I155),IF(J155*L155=0,-(10^10),J155*L155),IF(M155*P155=0,-(10^10),M155*P155))

    Thanks again.

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: MIN function, ignore blanks and errors, not a continuous range...

    Nice to hear it works, spacely.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  7. #7
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: MIN function, ignore blanks and errors, not a continuous range...

    Quote Originally Posted by spacely View Post
    Thank you very much. And for the MAX side of it, I'll use -10^10. My data will never break those bounds. Thanks for being so quick!
    You wouldn't need to use that for MAX, the only time that would return 0 is if every pair of cells contained a zero value, in which case, 0 would be the correct result.

    Similarly, bebo's formula will incorrectly return 10^10 if every pair of cells returns 0, when 0 would be the correct result.

    This will return the correct result, and still return a genuine zero when appropriate.

    =MIN(IFERROR(1/(1/CHOOSE({1,2,3,4},E138*F138,G138*I138,J138*L138,M138*P138)),""))

    Note that this is an array formula which must be confirmed by pressing Shift Ctrl and Enter together, not just enter.

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: MIN function, ignore blanks and errors, not a continuous range...

    Quote Originally Posted by jason.b75 View Post
    You wouldn't need to use that for MAX, the only time that would return 0 is if every pair of cells contained a zero value, in which case, 0 would be the correct result.
    Assuming that all values are negative, except 1 cell =0, then MAX = 0. To avoid this, assign 0 to be -10^10 is reasonable.

  9. #9
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: MIN function, ignore blanks and errors, not a continuous range...

    Quote Originally Posted by bebo021999 View Post
    Assuming that all values are negative, except 1 cell =0, then MAX = 0. To avoid this, assign 0 to be -10^10 is reasonable.
    But based on the original problem with MIN returning zero it is safe to assume that the values are positive.

  10. #10
    Registered User
    Join Date
    09-23-2007
    Posts
    54

    Re: MIN function, ignore blanks and errors, not a continuous range...

    Quote Originally Posted by jason.b75 View Post
    You wouldn't need to use that for MAX, the only time that would return 0 is if every pair of cells contained a zero value, in which case, 0 would be the correct result.

    Similarly, bebo's formula will incorrectly return 10^10 if every pair of cells returns 0, when 0 would be the correct result.

    This will return the correct result, and still return a genuine zero when appropriate.

    =MIN(IFERROR(1/(1/CHOOSE({1,2,3,4},E138*F138,G138*I138,J138*L138,M138*P138)),""))

    Note that this is an array formula which must be confirmed by pressing Shift Ctrl and Enter together, not just enter.
    Hi Jason,

    I wanted to revisit this solution using IFERROR and CHOOSE, this time for use in an IF-THEN situation. So, I have:

    =IF(DA9=N9*P9,N9,IF(DA9=Q9*S9,Q9,IF(DA9=T9*V9,T9,IF(DA9=W9*Y9,W9,"?"))))

    ...where W9 contains a formula that puts a blank in the cell, and so messes up the IF evaluation. This is a shortened equations, where there are many such "blanks". I see how the MIN is working, but not how to do an "ISEQUAL" kind of thing, so maybe we're stuck with IF?

    Hope you're still there, and thanks!
    Dave

  11. #11
    Registered User
    Join Date
    09-23-2007
    Posts
    54

    Re: MIN function, ignore blanks and errors, not a continuous range...

    I found a solution. I just checked each multiplication for success before taking the IF:

    =IF(DA9=ISERROR(N9*P9,10^10),N9, ... etc

    It will never equal 10^10, so safe.

+ 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] Create a list of uppercase data from a range excluding blanks and errors
    By PAexcel in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-17-2014, 01:32 PM
  2. Function to Return the first value of a row (With blanks and errors)
    By k2i2 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-15-2013, 04:19 PM
  3. Replies: 6
    Last Post: 03-04-2013, 06:34 PM
  4. If function to recognise Errors and Blanks
    By the3rdman77 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-25-2012, 05:00 PM
  5. Ignore Errors on multi-cell range without looping over cells
    By dlh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-07-2011, 08:25 PM
  6. Replies: 1
    Last Post: 01-25-2011, 10:37 PM
  7. How do i make a sum formula ignore #div/0! errors in the range
    By shat in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-22-2006, 09:50 AM

Tags for this Thread

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