Searching for #N/A

  • Thread starter Thread starter bgetson
  • Start date Start date
B

bgetson

I'm trying to create a formula that will tell me where the last
occurance of #N/A occurs in a table. If I have,

1 2 3 4 5
#N/A #N/A #N/A 2% 8%

I want a formula to tell me that the last occurance of #N/A is in
column 3, or that the first occurance of a real number is in column 4.
You can assume that the sets of #N/A will be contiguous.

Thank you.
-bgetson
 
One way ..

Assuming data in row2, in A2 across,
Array-entered (press CTRL+SHIFT+ENTER) in say B1:
=MATCH(TRUE,ISNUMBER(2:2),0)
 
To find the relative position of the last instance of #N/A:

=LOOKUP(2,1/ISNA(A2:E2),COLUMN(A2:E2)-MIN(COLUMN(A2:E2))+1)

To find the relative position of the first number:

Entered as an array using the key combination of CTRL,SHIFT,ENTER (not just
ENTER):

=MATCH(1,--ISNUMBER(A2:E2),0)

Biff
 
Some clarifications ..

The earlier array-entered:
=MATCH(TRUE,ISNUMBER(2:2),0)
will return the col number of the 1st occurrence of a real number

Adjusting arithmetically for it, array-entered:
=MATCH(TRUE,ISNUMBER(2:2),0)-1
will hence return the last occurrence of #N/A here, in your instance

---
 
This is great. All of these solve my problem. I hadn't realized that
there was an ISNUMBER function that would have helped.

Thank you.
-bgetson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Scrabble Value calculation for Welsh words 0
#N/A In Cells 7
Excel Help with dates 2
Index and Match 3
match formula 2
Sumproduct query 4
Formula to display last entry in a column populated with #N/As 4
MATCH and #N/A 4

Back
Top