If statement with a Vlookup

S

SRH@Boise

I am trying to build an IF formula, that first looks for the value in a
column on another tab, if found leave blank, If not found, to display text
(an "x").

I have tried variations of the following formula, unfortunately it says I
have too many arguments for this function.

=IF(ISNA(VLOOKUP(A2,'cardholder
list'!A:E,3,FALSE))=TRUE,"x",VLOOKUP(A2,'cardholder list'!A:E,3,FALSE)=
false, "")

I have tried to interchange false inside the vlookup to true and not getting
the desired result.

I appreciate any suggestions you have.
 
J

John McGhie

Try this one:
=IF(ISNA(VLOOKUP(B1,'cardholder list'!$A$1:$C$50,3,FALSE)=TRUE),"x","")

Note that I am constraining the rows in the lookup table.

This will also work:
=IF(ISNA(VLOOKUP(B1,'cardholder list'!A:C,3,FALSE)=TRUE),"x","")

However, the second one will give you a "refers to empty cells" error.

Hope this helps.


I am trying to build an IF formula, that first looks for the value in a
column on another tab, if found leave blank, If not found, to display text
(an "x").

I have tried variations of the following formula, unfortunately it says I
have too many arguments for this function.

=IF(ISNA(VLOOKUP(A2,'cardholder
list'!A:E,3,FALSE))=TRUE,"x",VLOOKUP(A2,'cardholder list'!A:E,3,FALSE)=
false, "")

I have tried to interchange false inside the vlookup to true and not getting
the desired result.

I appreciate any suggestions you have.

This email is my business email -- Please do not email me about forum
matters unless you intend to pay!
 
B

Bob Greenblatt

I am trying to build an IF formula, that first looks for the value in a
column on another tab, if found leave blank, If not found, to display text
(an "x").

I have tried variations of the following formula, unfortunately it says I
have too many arguments for this function.

=IF(ISNA(VLOOKUP(A2,'cardholder
list'!A:E,3,FALSE))=TRUE,"x",VLOOKUP(A2,'cardholder list'!A:E,3,FALSE)=
false, "")

I have tried to interchange false inside the vlookup to true and not getting
the desired result.

I appreciate any suggestions you have.
If you just want an "x" or a blank in the cell, then the formula should be:
=IF(ISNA(VLOOKUP(A2,'cardholder list'!A:E,3,FALSE)),"x","")
 
S

SRH@Boise

Thank you! I can live with the cell error. I have found this to be more
complex than anticipated based on the data I have. I have posted a second
post related to this on 3/17/10 asking about IF, Concantenate, Right and more
embedded -- hopefully you can help me there too! :)
 
S

SRH@Boise

Thank you!
--
SRH


Bob Greenblatt said:
If you just want an "x" or a blank in the cell, then the formula should be:
=IF(ISNA(VLOOKUP(A2,'cardholder list'!A:E,3,FALSE)),"x","")
 

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

Top