Rabu, 17 April 2013

Re: [ExcelVBA] Re: IF statement with VLOOKUP combined

 

> Put one more comma and copy paste the vlookup again ...

No. IfError() looks like Dawn has it. However, IfError() is only for Excel
2007 and later.

For Excel 2003 or earlier, you need If(IsError() ...

=If(IsError(VLOOKUP(A2,Sheet2!$A$2:Sheet2!$B$3,2,FALSE)),"",VLOOKUP(A2,Sheet2!$A$2:Sheet2!$B$3,2,FALSE))

For Excel 2007, you can use IfError ...

=IfError(VLOOKUP(A2,Sheet2!$A$2:Sheet2!$B$3,2,FALSE),"")

which is much nicer, just not backwards compatible.

Regards, Dave S

----- Original Message -----
From: "Viraj Moghe" <viraj_moghe@hotmail.com>
To: <ExcelVBA@yahoogroups.com>
Sent: Wednesday, April 17, 2013 12:25 PM
Subject: RE: [ExcelVBA] Re: IF statement with VLOOKUP combined

> Put one more comma and copy paste the vlookup again then it would work.
> Take care of braces
>
> Sent from my Windows Phone
> ________________________________
> From: Dawn
> Sent: 17-4-13 AM 02:45
> To: ExcelVBA@yahoogroups.com
> Subject: [ExcelVBA] Re: IF statement with VLOOKUP combined
>
> What I would use is
> =IfError(VLOOKUP(A2,Sheet2!$A$2:Sheet2!$B$3,2,FALSE),"")
>
> Dawn Bleuel
> Moderator
>
> --- In ExcelVBA@yahoogroups.com, Barry White <imtigerwords@...> wrote:
>>
>> Hello All,
>>
>> I have the following VLOOKUP that works fine,
>>
>> =VLOOKUP(A2,Sheet2!$A$2:Sheet2!$B$3,2,FALSE)
>>
>> However, in Column B, Gross Revenue, starting with B2, whenever the
>> result from the fill in value is #N/A because there is no exact match, I
>> was hoping to display the blank cell rather than the #N/A. I figured out
>> that double quotes can give me the blank cell (""), but I do not know how
>> to wrap this IF statement around the VLOOKUP statement I created.
>>
>> MRN Gross Rev
>> 123 2000
>> 234 #N/A
>> 345 #N/A
>> 456 3545
>>
>> Thank you for any help in advance.
>>
>> Eric Lutz
>>
>> [Non-text portions of this message have been removed]
>>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> ----------------------------------
> Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go
> here: http://www.mousetrax.com/techtrax to enter the ezine, then search
> the ARCHIVES for EXCEL VBA.
>
> ----------------------------------
> Visit our ExcelVBA group home page for more info and support files:
> http://groups.yahoo.com/group/ExcelVBA
>
> ----------------------------------
> More free tutorials and resources available at:
> http://www.mousetrax.com
>
> ----------------------------------Yahoo! Groups Links
>
>
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1432 / Virus Database: 3162/5748 - Release Date: 04/16/13
>

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (10)
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar