ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   vlookup inside an if statement? (https://www.excelbanter.com/excel-discussion-misc-queries/38586-vlookup-inside-if-statement.html)

carlosgdlf

vlookup inside an if statement?
 

--------------------------------------------------------------------------------

Hi everybody!

I have to do a vertical lookup of an object that might or might not
exist, in case it doesnt exist normally it gives back Ref! but the
thing is that if this objet doesnt appear on the data base is because
is zero.

This Ref! is not allowing me to make a sum since this objet is part of
it.
Maybe with an example would be easier to explain.


i have to pull from a database the number of cars sold of three brands
A,B, C, In the database unless is one car of the type it will not
appear.
lets say we have 3 B cars, 5 C cars and no A cars

i will have as a result of three vlookups one in each celd ref!(since
there is not any A car), 3 and 5 the in other celd I have the the sum
of this three but since I have that ref! the result will be a ref! as
well!

I would like that when the vlookup doesnt find any match(like A cars in
the example) give back a zero as result instead of a Ref!

Thanks in advance
Carlos


--
carlosgdlf
------------------------------------------------------------------------
carlosgdlf's Profile: http://www.excelforum.com/member.php...o&userid=25821
View this thread: http://www.excelforum.com/showthread...hreadid=392718


BenjieLop


This might be the formula that will help you ...

=IF(ISERROR(YOUR_VLOOKUP_FORMULA),0,YOUR_VLOOKUP_F ORMULA)


Regards.


--
BenjieLop


------------------------------------------------------------------------
BenjieLop's Profile: http://www.excelforum.com/member.php...o&userid=11019
View this thread: http://www.excelforum.com/showthread...hreadid=392718


carlosgdlf


Thanks benjie


BenjieLop Wrote:
This might be the formula that will help you ...

=IF(ISERROR(YOUR_VLOOKUP_FORMULA),0,YOUR_VLOOKUP_F ORMULA)


Regards.



--
carlosgdlf
------------------------------------------------------------------------
carlosgdlf's Profile: http://www.excelforum.com/member.php...o&userid=25821
View this thread: http://www.excelforum.com/showthread...hreadid=392718


BenjieLop


You're welcome ...


--
BenjieLop


------------------------------------------------------------------------
BenjieLop's Profile: http://www.excelforum.com/member.php...o&userid=11019
View this thread: http://www.excelforum.com/showthread...hreadid=392718



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

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