Vlookup

A

anb001

I have the following function in a worksheet:

=VLOOKUP(C4;'Waived Pivot'!$A$1:$B$100;2;0)

If there nothing to look up, it returns value: #N/A
Is it possible to get e.g. "-" returned in stead (without quotes).

Any help appreciated.

Thank
 
D

Domenic

Hi,

Try,

=IF(ISNA(VLOOKUP(C4;'Waived
Pivot'!$A$1:$B$100;2;0)),"-",VLOOKUP(C4;'Waived Pivot'!$A$1:$B$100;2;0))

Hope this helps!
 
H

Harry Bo

=If(iserror(VLOOKUP(C4;'Waived Pivot'!$A$1:$B$100;2;0),"",(VLOOKUP(C4;'Waived Pivot'!$A$1:$B$100;2;0))
 
N

Norman Harker

Hi anb100

Wrap your formula with a test for #N/A

=IF(ISNA(VLOOKUP(C4;'Waived
Pivot'!$A$1:$B$100;2;0));"-";VLOOKUP(C4;'Waived
Pivot'!$A$1:$B$100;2;0))
 
H

Harry Bo

Thanks Norman, never noticed that......too many sherbets!

Norman Harker said:
Hi anb100

Wrap your formula with a test for #N/A

=IF(ISNA(VLOOKUP(C4;'Waived
Pivot'!$A$1:$B$100;2;0));"-";VLOOKUP(C4;'Waived
Pivot'!$A$1:$B$100;2;0))
 
A

anb001

I have tried to use function as entered, but Excel tells me that ther
is a problem with flwg part:

,"",

Do not know whats wrong, though
 
S

sujeet

One of the most easiest formula to remove the #NA value i.e Try thi
function


=IF(COUNTIF(A1:B11,E1),VLOOKUP(E1,A1:B11,2,0),"0")

It will return the Zero value when it will not find any value.


Thanks,

Sujee
 
P

Peo Sjoblom

A couple of problems, "0" is not zero but a text representation of zero,
countif won't make any difference between numbers and text while vlookup
will,
it's better to use =IF(ISNA(MATCH(E1,A1:A11,0)),0,VLOOKUP(
of course if the lookups are all text you can use countif with confidence
but only the first column
A1:A11 not A1:B11

--
No private emails please, for everyone's
benefit keep the discussion in the newsgroup.


Regards,

Peo Sjoblom
 

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


Top