+ Reply to Thread
Results 1 to 11 of 11

How to ignore N/A in array formula

  1. #1
    Forum Contributor
    Join Date
    04-30-2012
    Location
    US
    MS-Off Ver
    Office 365 and 2021
    Posts
    124

    How to ignore N/A in array formula

    I have the following formula working fine if there is no N/A value between BY117:BY3753. But as I have vlookup , the forumula is not calculating the results as I have some N/A in that column. Is there a way that Excel ignore N/A and just calculate wherever the values are.

    {=MIN(IF(BY5:BY3753=BY5,$CA$5:$CA$3753))}

    Thanks,
    Rae

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: How to ignore N/A in array formula

    Try this (changes in red):

    =MIN(IF((ISNUMBER(BY5:BY3753))*(BY5:BY3753=BY5),$CA$5:$CA$3753)) Ctrl Shift Enter

    Or you can include IFERROR into your VLOOKUP formula like this:

    =IFERROR(formula,"")

    Then you can use your MIN IF function as-is.

    Edit: See below for corrections.
    Last edited by 63falcondude; 06-15-2017 at 01:50 PM.

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: How to ignore N/A in array formula

    Easiest to avoid the N/A in the first place. Put your VLOOKUP inside an IFERROR function

    =IFERROR(VLOOKUP(x,a:b,2,false), "") or

    =IFERROR(VLOOKUP(x,a:b,2,false), "N/A") if you like having N/A
    Then your arrayed formula should work.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

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

    Re: How to ignore N/A in array formula

    It won't work that way Falcondude.
    Because the isnumber only traps the error within the isnumber.
    But the error still exists in the *(BY5:BY3753=BY5)
    So you still have the #N/A error included in the math.

    You have to completely separate the error from the math with another IF..

    =MIN(IF(ISNUMBER(BY5:BY3753),IF(BY5:BY3753=BY5,$CA$5:$CA$3753)))

  5. #5
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: How to ignore N/A in array formula

    Jonmo, I tested it here and it seemed to work.

    See attached.
    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: How to ignore N/A in array formula

    It's also assuming the values in column BY are numeric. They may be textual values..

    In that case

    =MIN(IF(NOT(ISERROR(BY5:BY3753)),IF(BY5:BY3753=BY5,$CA$5:$CA$3753)))

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

    Re: How to ignore N/A in array formula

    Your math isn't including the range that contains the #N/A
    Formula from post #2 has the 2nd half of the multiplication is the same column that was tested for errors with isnumber.

    =MIN(IF((ISNUMBER(BY5:BY3753))*(BY5:BY3753=BY5)

  8. #8
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: How to ignore N/A in array formula

    Quote Originally Posted by Jonmo1 View Post
    It's also assuming the values in column BY are numeric.
    You're right, I didn't think of that.

    Quote Originally Posted by Jonmo1 View Post
    Your math isn't including the range that contains the #N/A
    Formula from post #2 has the 2nd half of the multiplication is the same column that was tested for errors with isnumber.
    Okay, I understand now.

    Sorry for any confusion.

  9. #9
    Forum Contributor
    Join Date
    04-30-2012
    Location
    US
    MS-Off Ver
    Office 365 and 2021
    Posts
    124

    Re: How to ignore N/A in array formula

    Great. Thank you so much everyone. Much appreciated.

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

    Re: How to ignore N/A in array formula

    Glad to help.

  11. #11
    Forum Contributor
    Join Date
    04-30-2012
    Location
    US
    MS-Off Ver
    Office 365 and 2021
    Posts
    124

    Re: How to ignore N/A in array formula

    comment deleted as it was not required.
    Last edited by Raehan; 06-15-2017 at 03:01 PM.

+ 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. Min array formula ignore current month
    By RPM509 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-15-2015, 06:07 PM
  2. How to ignore blanks in an Index/Match Array Formula
    By michaelcarrera in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-06-2015, 08:50 PM
  3. Ignore Blank Cells in MINIMUM array formula
    By taniwha in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-04-2013, 09:37 PM
  4. Ignore text in Sum Array formula
    By mkvassh in forum Excel General
    Replies: 7
    Last Post: 02-01-2013, 02:35 PM
  5. [SOLVED] Array formula to ignore blank cells
    By trickeyja in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-22-2012, 07:35 PM
  6. Array formula to ignore blank cells
    By bronsonb in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-13-2011, 09:14 AM
  7. array formula - ignore part of string
    By jonijay78 in forum Excel General
    Replies: 5
    Last Post: 08-03-2010, 12:50 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