Find #NA Error Using Lookup Function

gnaga

Well-known Member
Joined
Jul 9, 2002
Messages
748
Office Version
  1. 365
  2. 2016
  3. 2013
Platform
  1. Windows
Hi, All

Is this possible to find the first appearance of #NA error in a given range using any of the Excel Lookup Function? I would like to pick the data from one cell above where this #NA appears in my range.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Hi, All

Is this possible to find the first appearance of #NA error in a given range using any of the Excel Lookup Function? I would like to pick the data from one cell above where this #NA appears in my range.

Control+shift+enter, not just enter:

=INDEX(A2:A14,MIN(IF(ISNA(A2:A14),ROW(A2:A14)-ROW(A2)+1))-1)
 
Upvote 0
Hi, All

Is this possible to find the first appearance of #NA error in a given range using any of the Excel Lookup Function? I would like to pick the data from one cell above where this #NA appears in my range.
Try this...

Book1
ABC
268_86
358__
422__
586__
6#N/A__
781__
84__
993__
1043__
Sheet1

This array formula** entered in C2:

=INDEX(A2:A10,MATCH(TRUE,ISNA(A2:A10),0)-1)

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.

Assumes the #N/A will never be in the first cell of the range as there would be no cell above it!
 
Upvote 0
I tried both of your Array Formula. Both returns #NA error.

My range is O4:O1443 in that #NA error will appear in between and all the bottom cells since the first appearance of #NA error.
 
Upvote 0
I tried both of your Array Formula. Both returns #NA error.

My range is O4:O1443 in that #NA error will appear in between and all the bottom cells since the first appearance of #NA error.
Did you enter the formula as an array formula?

Array formulas are entered differently than a regular formula. After you type in a regular formula you hit the ENTER key. With an array formula you *must* use a combination of keys. Those keys are the CTRL key, the SHIFT key and the ENTER key. That is, hold down both the CTRL key and the SHIFT key then hit the ENTER key.

When done properly Excel will enclose the formula in squiggly brackets { }. You can't just type these brackets in, you *must* use the key combo to produce them. Also, anytime you edit an array formula it *must* be re-entered as an array using the key combo.

Here's a small sample file that demonstrates this.

ZZZgnaga.xls 15kb

http://cjoint.com/?AFAfe7Iitm6

As you can see, the formula does return the correct result.
 
Upvote 0
I tried both of your Array Formula. Both returns #NA error.

My range is O4:O1443 in that #NA error will appear in between and all the bottom cells since the first appearance of #NA error.

Adjusting the range and applying control+shift+enter should yield a non #N/A answer. By the way, the MATCH version is faster. If there is no #N/A in the range of interest, the formula will yield a diagnostic error.
 
Upvote 0
Thanks.

It is working fine after I enter the arraay formula correctly. Earlier I was doing some mistake in entering the formula.
 
Upvote 0
I realize this is an old thread. I had came up with the idea to use the =sum() formula because it always throws an error if an error is included in the range is it summing.

My formula looks like =IF(IFERROR(SUM(RANGE),"Check")<>"Check","Ok","Check"). This will either tell me its Ok or to Check the Range.
 
Upvote 0
I realize this is an old thread. I had came up with the idea to use the =sum() formula because it always throws an error if an error is included in the range is it summing.

My formula looks like =IF(IFERROR(SUM(RANGE),"Check")<>"Check","Ok","Check"). This will either tell me its Ok or to Check the Range.

Not sure whether you are offering a solution for the original poster (OP) or you have a question yourself.

If the former, mind you the OP was asking to caluculate MIN of a range while that range is infested with #N/A's.

If the latter, try to elaborate unless you are trying to SUM a range which contains #N/A or other values:

=SUM(SUMIFS(RANGE,RANGE,{"0<",">0"}))
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,831
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top