PC Review


Reply
Thread Tools Rate Thread

Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP

 
 
buffgirl71
Guest
Posts: n/a
 
      10th Nov 2006
I am using VLOOKUP and when that function doesn't find the value in the
table, it returns "#NA" as the value. I then can't sum the column
because of the #NA in some of the cells. Is there a way that I can
return a zero or a null instead of the #NA? I was thinking that perhaps
the VLOOKUP could be combined with IF... Thanks for your help in
advance.

 
Reply With Quote
 
 
 
 
Conan Kelly
Guest
Posts: n/a
 
      10th Nov 2006
Yes it can,

=IF(ISERROR{or other IS functions}(VLOOKUP([your vlookup arguments])),0,VLOOKUP([your vlookup arguments]))

I hope this helps,

Conan Kelly
"buffgirl71" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
>I am using VLOOKUP and when that function doesn't find the value in the
> table, it returns "#NA" as the value. I then can't sum the column
> because of the #NA in some of the cells. Is there a way that I can
> return a zero or a null instead of the #NA? I was thinking that perhaps
> the VLOOKUP could be combined with IF... Thanks for your help in
> advance.
>



 
Reply With Quote
 
=?Utf-8?B?VGVldGhsZXNzIG1hbWE=?=
Guest
Posts: n/a
 
      10th Nov 2006
=IF(ISNA(your formula),0,your formula)
Replace your formula with your VLOOKUP

"buffgirl71" wrote:

> I am using VLOOKUP and when that function doesn't find the value in the
> table, it returns "#NA" as the value. I then can't sum the column
> because of the #NA in some of the cells. Is there a way that I can
> return a zero or a null instead of the #NA? I was thinking that perhaps
> the VLOOKUP could be combined with IF... Thanks for your help in
> advance.
>
>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      10th Nov 2006
=if(iserror(vlookup(...)),0,vlookup(...))
or
=if(iserror(vlookup(...)),"",vlookup(...))

The second formula will work if your summing using =sum(). That function
ignores text. But if you're using something like:
=b1+C1+D1
Then the summing won't work.



buffgirl71 wrote:
>
> I am using VLOOKUP and when that function doesn't find the value in the
> table, it returns "#NA" as the value. I then can't sum the column
> because of the #NA in some of the cells. Is there a way that I can
> return a zero or a null instead of the #NA? I was thinking that perhaps
> the VLOOKUP could be combined with IF... Thanks for your help in
> advance.


--

Dave Peterson
 
Reply With Quote
 
buffgirl71
Guest
Posts: n/a
 
      11th Nov 2006
Thanks to all for your responses - but I don't seem to have it quite
right. This is my formula:

=IF(=ISERROR(=VLOOKUP(I4,FUEL!$G$2:$I$2044,2,FALSE)),0,=VLOOKUP(I4,FUEL!$G$2:$I$2044,2,FALSE))


but I'm getting a message that the formula contains an error. I can't
see what's wrong...I must have mismatched parens or something. If
anyone can see what's wrong, I'd appreciate your letting me know. Many
thanks.


Conan Kelly wrote:
> Yes it can,
>
> =IF(ISERROR{or other IS functions}(VLOOKUP([your vlookup arguments])),0,VLOOKUP([your vlookup arguments]))
>
> I hope this helps,
>
> Conan Kelly
> "buffgirl71" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> >I am using VLOOKUP and when that function doesn't find the value in the
> > table, it returns "#NA" as the value. I then can't sum the column
> > because of the #NA in some of the cells. Is there a way that I can
> > return a zero or a null instead of the #NA? I was thinking that perhaps
> > the VLOOKUP could be combined with IF... Thanks for your help in
> > advance.
> >


 
Reply With Quote
 
buffgirl71
Guest
Posts: n/a
 
      11th Nov 2006
Thanks to all for your responses - but I don't seem to have it quite
right. This is my formula:

=IF(=ISERROR(=VLOOKUP(I4,FUEL!$G$2:$I$2044,2,FALSE)),0,=VLOOKUP(I4,FUEL!$G$2:$I$2044,2,FALSE))


but I'm getting a message that the formula contains an error. I can't
see what's wrong...I must have mismatched parens or something. If
anyone can see what's wrong, I'd appreciate your letting me know. Many
thanks.


Conan Kelly wrote:
> Yes it can,
>
> =IF(ISERROR{or other IS functions}(VLOOKUP([your vlookup arguments])),0,VLOOKUP([your vlookup arguments]))
>
> I hope this helps,
>
> Conan Kelly
> "buffgirl71" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> >I am using VLOOKUP and when that function doesn't find the value in the
> > table, it returns "#NA" as the value. I then can't sum the column
> > because of the #NA in some of the cells. Is there a way that I can
> > return a zero or a null instead of the #NA? I was thinking that perhaps
> > the VLOOKUP could be combined with IF... Thanks for your help in
> > advance.
> >


 
Reply With Quote
 
buffgirl71
Guest
Posts: n/a
 
      11th Nov 2006
Thanks to all for your responses - but I don't seem to have it quite
right. This is my formula:

=IF(=ISERROR(=VLOOKUP(I4,FUEL!$G$2:$I$2044,2,FALSE)),0,=VLOOKUP(I4,FUEL!$G$*2:$I$2044,2,FALSE))



but I'm getting a message that the formula contains an error. I can't
see what's wrong...I must have mismatched parens or something. If
anyone can see what's wrong, I'd appreciate your letting me know. Many
thanks.



Dave Peterson wrote:
> =if(iserror(vlookup(...)),0,vlookup(...))
> or
> =if(iserror(vlookup(...)),"",vlookup(...))
>
> The second formula will work if your summing using =sum(). That function
> ignores text. But if you're using something like:
> =b1+C1+D1
> Then the summing won't work.
>
>
>
> buffgirl71 wrote:
> >
> > I am using VLOOKUP and when that function doesn't find the value in the
> > table, it returns "#NA" as the value. I then can't sum the column
> > because of the #NA in some of the cells. Is there a way that I can
> > return a zero or a null instead of the #NA? I was thinking that perhaps
> > the VLOOKUP could be combined with IF... Thanks for your help in
> > advance.

>
> --
>
> Dave Peterson


 
Reply With Quote
 
=?Utf-8?B?VGVldGhsZXNzIG1hbWE=?=
Guest
Posts: n/a
 
      11th Nov 2006
You have too many "=" remove them all except the first one.

"buffgirl71" wrote:

> Thanks to all for your responses - but I don't seem to have it quite
> right. This is my formula:
>
> =IF(=ISERROR(=VLOOKUP(I4,FUEL!$G$2:$I$2044,2,FALSE)),0,=VLOOKUP(I4,FUEL!$G$2:$I$2044,2,FALSE))
>
>
> but I'm getting a message that the formula contains an error. I can't
> see what's wrong...I must have mismatched parens or something. If
> anyone can see what's wrong, I'd appreciate your letting me know. Many
> thanks.
>
>
> Conan Kelly wrote:
> > Yes it can,
> >
> > =IF(ISERROR{or other IS functions}(VLOOKUP([your vlookup arguments])),0,VLOOKUP([your vlookup arguments]))
> >
> > I hope this helps,
> >
> > Conan Kelly
> > "buffgirl71" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> > >I am using VLOOKUP and when that function doesn't find the value in the
> > > table, it returns "#NA" as the value. I then can't sum the column
> > > because of the #NA in some of the cells. Is there a way that I can
> > > return a zero or a null instead of the #NA? I was thinking that perhaps
> > > the VLOOKUP could be combined with IF... Thanks for your help in
> > > advance.
> > >

>
>

 
Reply With Quote
 
Conan Kelly
Guest
Posts: n/a
 
      11th Nov 2006
buffgirl,

there only needs to be one equal sign (=) in this formula. Start it with one. All the rest are not needed.

=IF(ISERROR(VLOOKUP(I4,FUEL!$G$2:$I$2044,2,FALSE)),0,VLOOKUP(I4,FUEL!$G$2:$I$2044,2,FALSE))

I hope this helps,

Conan Kelly





"buffgirl71" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> Thanks to all for your responses - but I don't seem to have it quite
> right. This is my formula:
>
> =IF(=ISERROR(=VLOOKUP(I4,FUEL!$G$2:$I$2044,2,FALSE)),0,=VLOOKUP(I4,FUEL!$G$2:$I$2044,2,FALSE))
>
>
> but I'm getting a message that the formula contains an error. I can't
> see what's wrong...I must have mismatched parens or something. If
> anyone can see what's wrong, I'd appreciate your letting me know. Many
> thanks.
>
>
> Conan Kelly wrote:
>> Yes it can,
>>
>> =IF(ISERROR{or other IS functions}(VLOOKUP([your vlookup arguments])),0,VLOOKUP([your vlookup arguments]))
>>
>> I hope this helps,
>>
>> Conan Kelly
>> "buffgirl71" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
>> >I am using VLOOKUP and when that function doesn't find the value in the
>> > table, it returns "#NA" as the value. I then can't sum the column
>> > because of the #NA in some of the cells. Is there a way that I can
>> > return a zero or a null instead of the #NA? I was thinking that perhaps
>> > the VLOOKUP could be combined with IF... Thanks for your help in
>> > advance.
>> >

>



 
Reply With Quote
 
buffgirl71
Guest
Posts: n/a
 
      11th Nov 2006
HALLELUIA!!! You're all geniuses - thank you SO much - it works
PERFECTLY!!!

Enjoy your weekends -


buffgirl71 wrote:
> I am using VLOOKUP and when that function doesn't find the value in the
> table, it returns "#NA" as the value. I then can't sum the column
> because of the #NA in some of the cells. Is there a way that I can
> return a zero or a null instead of the #NA? I was thinking that perhaps
> the VLOOKUP could be combined with IF... Thanks for your help in
> advance.


 
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
Formula returned in vlookup function 87vette Microsoft Excel New Users 2 21st May 2010 06:34 PM
combine vlookup and copy function =?Utf-8?B?cGFtYmVy?= Microsoft Excel Worksheet Functions 2 17th Sep 2007 11:12 PM
combine Vlookup with the Right function Harold Good Microsoft Excel Worksheet Functions 3 4th May 2007 04:10 PM
How do I combine If and VLookup function? =?Utf-8?B?RmVsaWNpYSBQaWNrZXR0?= Microsoft Excel Worksheet Functions 2 14th Dec 2005 12:06 AM
How to combine a vlookup with a sumif function!!! Mark the Shark Microsoft Excel Misc 2 6th Apr 2005 11:54 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:32 PM.