PC Review


Reply
Thread Tools Rate Thread

Avoiding a #n/a error

 
 
brian.baker13@googlemail.com
Guest
Posts: n/a
 
      4th Mar 2008
Hi

I have a VLOOKUP in calculation =VLOOKUP(D14,'[Week 2.xls]Daily Lines'!
$A$4:$Y$18,23,0)/1000.

Basically When looking up the value in D14 if it is not in the [Week
2.xls]Daily Lines' sheet I am getting the #n/a error. Basically I
would like to return a zero or blank if d14 is not in the table array.
Can you please help.

I am subtotalling data so the #n/a error knocks things out straight
away.

Thanks

Brian
 
Reply With Quote
 
 
 
 
Pete_UK
Guest
Posts: n/a
 
      4th Mar 2008
Try it like this:

=IF(ISNA(VLOOKUP(D14,'[Week 2.xls]Daily Lines'!$A$4:$Y$18,23,0)),
0,VLOOKUP(D14,'[Week 2.xls]Daily Lines'!$A$4:$Y$18,23,0)/1000)

Will return zero instead of #N/A, which is fine for subtotals. You
might like to return "" instead.

Hope this helps.

Pete

On Mar 4, 9:47*am, "brian.bake...@googlemail.com"
<brian.bake...@googlemail.com> wrote:
> Hi
>
> I have a VLOOKUP in calculation =VLOOKUP(D14,'[Week 2.xls]Daily Lines'!
> $A$4:$Y$18,23,0)/1000.
>
> Basically When looking up the value in D14 if it is not in the [Week
> 2.xls]Daily Lines' sheet I am getting the #n/a error. Basically I
> would like to return a zero or blank if d14 is not in the table array.
> Can you please help.
>
> I am subtotalling data so the #n/a error knocks things out straight
> away.
>
> Thanks
>
> Brian


 
Reply With Quote
 
brian.baker13@googlemail.com
Guest
Posts: n/a
 
      4th Mar 2008
On 4 Mar, 09:50, Pete_UK <pashu...@auditel.net> wrote:
> Try it like this:
>
> =IF(ISNA(VLOOKUP(D14,'[Week 2.xls]Daily Lines'!$A$4:$Y$18,23,0)),
> 0,VLOOKUP(D14,'[Week 2.xls]Daily Lines'!$A$4:$Y$18,23,0)/1000)
>
> Will return zero instead of #N/A, which is fine for subtotals. You
> might like to return "" instead.
>
> Hope this helps.
>
> Pete
>
> On Mar 4, 9:47*am, "brian.bake...@googlemail.com"
>
>
>
> <brian.bake...@googlemail.com> wrote:
> > Hi

>
> > I have a VLOOKUP in calculation =VLOOKUP(D14,'[Week 2.xls]Daily Lines'!
> > $A$4:$Y$18,23,0)/1000.

>
> > Basically When looking up the value in D14 if it is not in the [Week
> > 2.xls]Daily Lines' sheet I am getting the #n/a error. Basically I
> > would like to return a zero or blank if d14 is not in the table array.
> > Can you please help.

>
> > I am subtotalling data so the #n/a error knocks things out straight
> > away.

>
> > Thanks

>
> > Brian- Hide quoted text -

>
> - Show quoted text -


Great stuff

Works a treat
 
Reply With Quote
 
Pete_UK
Guest
Posts: n/a
 
      4th Mar 2008
Thanks for feeding back - glad to be of help.

Pete

On Mar 4, 10:50*am, "brian.bake...@googlemail.com"
<brian.bake...@googlemail.com> wrote:
> On 4 Mar, 09:50, Pete_UK <pashu...@auditel.net> wrote:
>
>
>
>
>
> > Try it like this:

>
> > =IF(ISNA(VLOOKUP(D14,'[Week 2.xls]Daily Lines'!$A$4:$Y$18,23,0)),
> > 0,VLOOKUP(D14,'[Week 2.xls]Daily Lines'!$A$4:$Y$18,23,0)/1000)

>
> > Will return zero instead of #N/A, which is fine for subtotals. You
> > might like to return "" instead.

>
> > Hope this helps.

>
> > Pete

>
> > On Mar 4, 9:47*am, "brian.bake...@googlemail.com"

>
> > <brian.bake...@googlemail.com> wrote:
> > > Hi

>
> > > I have a VLOOKUP in calculation =VLOOKUP(D14,'[Week 2.xls]Daily Lines'!
> > > $A$4:$Y$18,23,0)/1000.

>
> > > Basically When looking up the value in D14 if it is not in the [Week
> > > 2.xls]Daily Lines' sheet I am getting the #n/a error. Basically I
> > > would like to return a zero or blank if d14 is not in the table array.
> > > Can you please help.

>
> > > I am subtotalling data so the #n/a error knocks things out straight
> > > away.

>
> > > Thanks

>
> > > Brian- Hide quoted text -

>
> > - Show quoted text -

>
> Great stuff
>
> Works a treat- Hide quoted text -
>
> - Show quoted text -


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Avoiding hyperlink error =?Utf-8?B?QUJhbHVzdQ==?= Microsoft Excel Programming 0 18th Oct 2007 05:08 PM
Avoiding an error Francis Hookham Microsoft Excel Programming 2 10th Apr 2007 10:32 PM
Avoiding the dreaded #div/0 error Marie1uk Microsoft Excel Worksheet Functions 10 21st Jul 2005 10:49 PM
Avoiding 400 Error code =?Utf-8?B?bm9zcGFtaW5saWNo?= Microsoft Excel Programming 2 2nd Feb 2005 07:55 PM
avoiding debug error R D S Microsoft Excel Misc 3 25th Jun 2004 10:14 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:09 PM.