Show "-" instead of #N/A

sythong

Active Member
Joined
Jun 26, 2004
Messages
324
Hi I am back again

How to make the following show "-" instead of #N/A when that
cell AF81 does not contain an entry in the named range?



=INDEX(List1,MATCH(AF81,List2,),2)

Thanks for reading this post
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Try in 2007:

Iferror(INDEX(List1,MATCH(AF81,List2,),2),"-")

and in 2003
If(iserror(INDEX(List1,MATCH(AF81,List2,),2),"-",INDEX(List1,MATCH(AF81,List2,),2))

George

QUOTE=sythong;2678582]Hi I am back again

How to make the following show "-" instead of #N/A when that
cell AF81 does not contain an entry in the named range?



=INDEX(List1,MATCH(AF81,List2,),2)

Thanks for reading this post[/QUOTE]
 
Upvote 0
On systems prior to 2007...

=IF(ISNUMBER(MATCH(AF81,List2,0)),INDEX(List1,MATCH(AF81,List2,0)),"-")

would be a bit less costly.
 
Upvote 0
Hi Aladin,

Being less costly you mean in terms of memory and time that the formula is being evaluated?

Thanks in advance for your input

George



On systems prior to 2007...

=IF(ISNUMBER(MATCH(AF81,List2,0)),INDEX(List1,MATCH(AF81,List2,0)),"-")

would be a bit less costly.
 
Upvote 0
Aladin

Your suggestion worked

George

If(iserror(INDEX(List1,MATCH(AF81,List2,),2),"-",INDEX(List1,MATCH(AF81,List2,),2))
doesnt seems to work for me.

Thanks for the suggestions
 
Upvote 0
Aladin



Now I have a problem. It shows #REF when I
put a dash instead of alpha or numeric details.

Any suggestions
Thanks
 
Upvote 0
Aladin



Now I have a problem. It shows #REF when I
put a dash instead of alpha or numeric details.

Any suggestions
Thanks

Are you feeding the result of:

=IF(ISNUMBER(MATCH(AF81,List2,0)),INDEX(List1,MATCH(AF81,List2,0)),"-")

to another formula where you get a #REF! error or what? Care to elaborate?
 
Upvote 0
Aladin

First thank you very much for responding.

My initial syntax was =INDEX(List1,MATCH(AF81,List2,),2)
This was used to lookup the individual code for debtor and creditor.
It worked fine when the cells are input with the respective debtor
and creditor name but my account trial balance consist not only of
debtors and creditors names but also others. When this is input with
the debtor/creditor it will show correctly the respective code but
other names or dash will show #N/A.

On using =IF(ISNUMBER(MATCH(AF81,List2,0)),INDEX(List1,MATCH(AF81,List2,0)),"-")
it also worked on debtors/creditors perfectly plus certain cells but will also throw
up #REF

This has really got me floored
 
Upvote 0
Aladin

First thank you very much for responding.

My initial syntax was =INDEX(List1,MATCH(AF81,List2,),2)
This was used to lookup the individual code for debtor and creditor.
It worked fine when the cells are input with the respective debtor
and creditor name but my account trial balance consist not only of
debtors and creditors names but also others. When this is input with
the debtor/creditor it will show correctly the respective code but
other names or dash will show #N/A.

On using =IF(ISNUMBER(MATCH(AF81,List2,0)),INDEX(List1,MATCH(AF81,List2,0)),"-")
it also worked on debtors/creditors perfectly plus certain cells but will also throw
up #REF

This has really got me floored

What do you get with:

=SUMPRODUCT(ISERROR(List1)+0)

and with:

=SUMPRODUCT(ISERROR(List2)+0)
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,733
Members
452,939
Latest member
WCrawford

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