How do I make the #N/A not populate a cell?

Marq

Well-known Member
Joined
Dec 13, 2004
Messages
914
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
Excel 2007

I have the formula below in a cell.....the formula is providing me a name of a person based on an associated number.....for instances where there is no number, no name is required so I get the "#N/A" result.....what do I put in the formula to make the #N/A disappear?

Here is the formula:

=INDEX($B$4:$B$15,MATCH(G7,$A$4:$A$15,0),1)
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
You need to use an error handler:

Excel 2003 or older:
=IF(ISERROR(INDEX($B$4:$B$15,MATCH(G7,$A$4:$A$15,0),1)),"",INDEX($B$4:$B$15,MATCH(G7,$A$4:$A$15,0),1))

Excel 2007 or newer:
=IFERROR(INDEX($B$4:$B$15,MATCH(G7,$A$4:$A$15,0),1),"")

Note: I highlighted your formula in blue so you can easier see what I added to the formula.
 
Upvote 0
Try

=IF(ISNA(INDEX($B$4:$B$15,MATCH(G7,$A$4:$A$15,0),1)),"",INDEX($B$4:$B$15,MATCH(G7,$A$4:$A$15,0),1))
 
Upvote 0
You need to use an error handler:

Excel 2003 or older:
=IF(ISERROR(INDEX($B$4:$B$15,MATCH(G7,$A$4:$A$15,0),1)),"",INDEX($B$4:$B$15,MATCH(G7,$A$4:$A$15,0),1))

Excel 2007 or newer:
=IFERROR(INDEX($B$4:$B$15,MATCH(G7,$A$4:$A$15,0),1),"")

Note: I highlighted your formula in blue so you can easier see what I added to the formula.

using 2007

and it works perfect!..thanks!
 
Upvote 0

Forum statistics

Threads
1,224,584
Messages
6,179,691
Members
452,938
Latest member
babeneker

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