ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF and Vlookup (https://www.excelbanter.com/excel-worksheet-functions/238493-if-vlookup.html)

Natalie

IF and Vlookup
 
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

Jacob Skaria

IF and Vlookup
 
=if(isna(vlookupformula),"closed",vlookupformula)

If this post helps click Yes
---------------
Jacob Skaria


"Natalie" wrote:

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


Eduardo

IF and Vlookup
 
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


"Natalie" wrote:

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


Alan McQuaid via OfficeKB.com

IF and Vlookup
 
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",VLOO KUP(A1,X:Y,2,FALSE))

Alan

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200907/1



All times are GMT +1. The time now is 03:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com