IF and Vlookup

N

Natalie

Hi

I want to say if a vlookup returns a value put that value, and if it returns
#N/A, then put "CLOSED"

Can this be done?

Natalie
 
J

Jacob Skaria

=if(isna(vlookupformula),"closed",vlookupformula)

If this post helps click Yes
 
E

Eduardo

Hi,
it return N/A because one of the cell is empty so change the cell that is
empty for your cell in my formula

=if(A2="","CLOSED",your Vlookup formula)

if you provide your formula indicating which field is blank I will be able
to help further
 
A

Alan McQuaid via OfficeKB.com

Hi Natalie,

You can use ISNA or ISERROR

As an example, where you have your Vlookup

=VLOOKUP(A1,X:Y,2,FALSE)

replace with

=IF(ISNA(VLOOKUP(A1,X:Y,2,FALSE)),"CLOSED",VLOOKUP(A1,X:Y,2,FALSE))

or

=IF(ISERROR(VLOOKUP(A1,X:Y,2,FALSE)),"CLOSED",VLOOKUP(A1,X:Y,2,FALSE))

Alan
 

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