ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formula have a VLOOKUP but want it to =0 if no value is found (https://www.excelbanter.com/excel-worksheet-functions/246534-formula-have-vlookup-but-want-%3D0-if-no-value-found.html)

Nicole

Formula have a VLOOKUP but want it to =0 if no value is found
 
Hi,
I have entered a VLOOKUP to search an Item no. and return the amount in sold
in the month. The VLOOKUP returns the closest value from the nearest item no.

Should I use an IF function so that it will only put in a value if the item
number matches exactly?

Can anyone help?

Thank you in advance,
Nicole

T. Valko

Formula have a VLOOKUP but want it to =0 if no value is found
 
First, set the range_lookup argument to 0 or FALSE. This will ensure that
*only* exact matches are found.

=VLOOKUP("A",X:Y,2,0)

Then, you'll have to add an error trap to the formula. Since you didn't post
your formula this is a generic method of error trapping.

=IF(ISNA(your_formula_here),0,your_formula_here)

--
Biff
Microsoft Excel MVP


"Nicole" wrote in message
...
Hi,
I have entered a VLOOKUP to search an Item no. and return the amount in
sold
in the month. The VLOOKUP returns the closest value from the nearest item
no.

Should I use an IF function so that it will only put in a value if the
item
number matches exactly?

Can anyone help?

Thank you in advance,
Nicole




Nicole

Formula have a VLOOKUP but want it to =0 if no value is found
 
Thank you, this has worked.

Kind Regards,
Nicole Clayfield

"T. Valko" wrote:

First, set the range_lookup argument to 0 or FALSE. This will ensure that
*only* exact matches are found.

=VLOOKUP("A",X:Y,2,0)

Then, you'll have to add an error trap to the formula. Since you didn't post
your formula this is a generic method of error trapping.

=IF(ISNA(your_formula_here),0,your_formula_here)

--
Biff
Microsoft Excel MVP


"Nicole" wrote in message
...
Hi,
I have entered a VLOOKUP to search an Item no. and return the amount in
sold
in the month. The VLOOKUP returns the closest value from the nearest item
no.

Should I use an IF function so that it will only put in a value if the
item
number matches exactly?

Can anyone help?

Thank you in advance,
Nicole



.


T. Valko

Formula have a VLOOKUP but want it to =0 if no value is found
 
You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Nicole" wrote in message
...
Thank you, this has worked.

Kind Regards,
Nicole Clayfield

"T. Valko" wrote:

First, set the range_lookup argument to 0 or FALSE. This will ensure that
*only* exact matches are found.

=VLOOKUP("A",X:Y,2,0)

Then, you'll have to add an error trap to the formula. Since you didn't
post
your formula this is a generic method of error trapping.

=IF(ISNA(your_formula_here),0,your_formula_here)

--
Biff
Microsoft Excel MVP


"Nicole" wrote in message
...
Hi,
I have entered a VLOOKUP to search an Item no. and return the amount in
sold
in the month. The VLOOKUP returns the closest value from the nearest
item
no.

Should I use an IF function so that it will only put in a value if the
item
number matches exactly?

Can anyone help?

Thank you in advance,
Nicole



.





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

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