index / match question

alwayslearning45

New Member
Joined
Aug 1, 2017
Messages
3
Hello
I have the following formula which returns a #NA value if the contents of A8 are not actually present in the data (pivot table). I'd like to refine the formula so that it returns a 0 number value (or no value at all) if A14 is not actually there to match.

=INDEX(Data!$B$2:$B$16,MATCH(Waitomo!A14,Data!$A$2:$A$16,0))

Thanks.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Sorry, I meant the contents of A14......

Hello
I have the following formula which returns a #NA value if the contents of A8 are not actually present in the data (pivot table). I'd like to refine the formula so that it returns a 0 number value (or no value at all) if A14 is not actually there to match.

=INDEX(Data!$B$2:$B$16,MATCH(Waitomo!A14,Data!$A$2:$A$16,0))

Thanks.
 
Upvote 0
You can just put it inside the IFNA function.

=IFNA(INDEX(Data!$B$2:$B$16,MATCH(Waitomo!A14,Data!$A$2:$A$16,0)),0)

You can change that last 0 to whatever you want the cell to display if the Index/Match returns #NA . Use "" for blank.
 
Upvote 0
Hi, I'm now getting a #NAME error. FYI, the contents of cell A14 in this instance is a name.


You can just put it inside the IFNA function.

=IFNA(INDEX(Data!$B$2:$B$16,MATCH(Waitomo!A14,Data!$A$2:$A$16,0)),0)

You can change that last 0 to whatever you want the cell to display if the Index/Match returns #NA . Use "" for blank.
 
Upvote 0

Forum statistics

Threads
1,215,778
Messages
6,126,841
Members
449,343
Latest member
DEWS2031

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