Vlookup if 0 then POA

G

Guest

How do I set the result field to POA if Zero is returned when I use Vlookup?
I am working on a pricebook. When there is no price I would like to insert
POA (or even just a blank) I need to retain the vlookup formula.
In cell B1 enter =VLOOKUP(A1,Sheet1!A:B,2,FALSE)
In cell C1 I enter =IF(B:B=0,"POA",B:B)
How can I combine these 2 formulas so the final result is in B1 and there is
no need for C1.

Thank you
 
G

Guest

Obwan,

You should be able to use an IF statement to test your VLOOKUP

=If(VLOOKUP(A1,Sheet1!A:B,2,FALSE)=0,"POA",VLOOKUP(A1,Sheet1!A:B,2,FALSE))
 
G

Guest

Thank you so much. I had been trying different combinations for about 45
minutes. Your response was within seconds of my post. Very much
appreciated.
 
R

Roger Govier

Hi

Depending upon how many such formulae you have, it would be quicker to
use
=IF(COUNTIF(Sheet1!A:A,A1),VLOOKUP(A1,Sheet1!A:B,2,FALSE),"POA")
as this would not require a double lookup.
 
G

Guest

Thanks Roger
No doubt I did it incorrectly but when I used this I still have zero and not
POA. Sorry I can't attach my spreadsheet so you can double check.
 
R

Roger Govier

No, my mistake.
I totally misread the question and thought it was if the Item didn't
exist in A:A you needed POA, not that the lookup value of the item was
zero.
Sorry for the confusion.
 

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