ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   need help with lookup function (https://www.excelbanter.com/excel-worksheet-functions/85973-need-help-lookup-function.html)

wii

need help with lookup function
 

WHEN USING VLOOKUP.....


I am looking up an item in 2 different tables, however sometimes the
item is not in both tables.

When the one table does not have the item, excel returns a (n/a)
entry.

How do I program it to use a default value of 0 when no record is
found???


=VLOOKUP(A2,WAUKREF!A2:S1000,18,0)
+VLOOKUP(A2,WWREF!$A$2:$S$1000,18,0)

I THOUGHT MAYBE "0" IN THE ARGUMENT, BUT IT IS NOT WORKING.

IT IS BEING USED TO AUTO CALCULATE THE COMBINATION OF THE TWO FEILDS

ANY HELP WOULD BE GREATLY APPRECIATED


--
wii
------------------------------------------------------------------------
wii's Profile: http://www.excelforum.com/member.php...o&userid=33958
View this thread: http://www.excelforum.com/showthread...hreadid=537340


Pete_UK

need help with lookup function
 
Try this:

=if(isna(VLOOKUP(A2,WAUKREF!A2:S1000,18,0)),0,VLOO KUP(A2,WAUKREF!A2:S1000,18,0))

+if(isna(VLOOKUP(A2,WWREF!$A$2:$S$1000,18,0)),0,VL OOKUP(A2,WWREF!$A$2:$S$1000,18,0))

Should give you what you want - the lower case will convert to upper
case once you type it in.

Hope this helps.

Pete



All times are GMT +1. The time now is 01:52 AM.

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