How can i change the #N/A error for a 0 value

T

Teresita

I have a list of people......
a1:a3 b1:b3
7 Ana
8 Marie
9 Susan

I have the following formula:
=index(a1:b3,match("susan",b1:b3,0),1)
The result is: 9 But if the list does not have Susan, it gave me #N/A
error value.... i need to add the result in a formula...... but with the
error value it is not possible. is there any way to get 0 instead of #N/A
when the formula does not mach the list?
 
D

Dave Peterson

=if(isna(match("susan",b1:b3,0)),0,index(a1:a3,match("susan",b1:b3,0)))

(I changed your =index() a bit.)

And if you're using xl2007, look at =iferror() in excel's help.
 
K

Kevin B

Try the following IF variation:

=IF(ISNA(INDEX(A1:B13,MATCH("susan",B1:B3,0),1)),0,INDEX(A1:B13,MATCH("susan",B1:B3,0),1))
 

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

Top