Solved

How to avoid #N/A values in an array with Index - Match

Posted on 2015-02-18
4
491 Views
Last Modified: 2015-02-19
In my workbook is a worksheet with some simple test data.

Row 5, 7, 9 are paste values from the general workbook. Row 5 has all numeric values. Row 7 & 9 have some values that are #N/A by default as to allow for graphing purposes.
The formula I use is: {=INDEX(B5:FZ5,MATCH(MIN(IF(B5:FZ5-K12>=0,B5:FZ5,FALSE)),IF(B5:FZ5-K12>=0,B5:FZ5,FALSE),0))} as an array and works perfectly in Row 5 since there are no #N/A values there.

How do I get the same formula to ignore the #N/A values in Rows 7 & 9 and still give me a proper result?
PROBLEM.xlsx
0
Comment
Question by:DougDodge
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 51

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 40618312
HI,

pls try in O12

as Array formula

=IFERROR(INDEX(B7:NB7,MATCH(MIN(IFERROR(IF(B7:NB7-K12>=0,B7:NB7,FALSE),FALSE)),IFERROR(IF(B7:NB7-K12>=0,B7:NB7,FALSE),FALSE),0)),"")


Regards
0
 
LVL 30

Expert Comment

by:gowflow
ID: 40618389
Not for points as already Rgonzo provided the answer. I made the corrections in the workbook and attached it as need to make a small comment you should ALWAYS account for IFERROR in these formulas even if you feel that some of them could be ok without.

Just a question you requested to change the formula in the red cells but question is how you get the data in row 7 and 9 only from these red cells ? or there is also other formulas ??? as we only see values except the red cells and the ones beside it which have been all corrected. So if you have somewhere else also formulas you also need to account for an IFERROR as you may possibly get some #NA coming from other places.

Still here waiting to help you on the other pending issues when time is right for you.
gowflow
PROBLEM-V01.xlsx
0
 

Author Closing Comment

by:DougDodge
ID: 40618562
Thank you kind sir, you saved me from a troubling problem.
0
 
LVL 30

Expert Comment

by:gowflow
ID: 40618902
@DougDodge
As a side note I just noticed you requested the Linear progressing question to be deleted. Will be glad to assist if you have other project simply put a link in here for any help needed.

gowflow
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question