View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Aladin Akyurek[_4_] Aladin Akyurek[_4_] is offline
external usenet poster
 
Posts: 1
Default stuck with VLOOKUP


1. If you have the morefunc.xll add-in...

=IF(ISNA(SETV(VLOOKUP($H12,SLOW,2,0))),0,GETV())

2. If you add the V() function to your workbook...

=IF(ISNA(V(VLOOKUP($H12,SLOW,2,0))),0,V())

Public Function V(Optional vrnt As Variant) As Variant
'
' Stephen Dunn
' 2002-09-12
'
Static vrntV As Variant
If Not IsMissing(vrnt) Then vrntV = vrnt
V = vrntV
End Function

To add this to your workbook:

Activate Tools|Macro|Visual Basic Editor;
Activate Insert|Module;
Copy the UDF above and paste it in the pane entitled "...(code)".
Activate File|Close and Return to Microsoft Excel.


3. When Microsoft considers extending lookup functions with an optional
ReturnValue as proposed eons ago...

=VLOOKUP($H12,SLOW,2,0,0)

yimcw Wrote:
i am new user. i use VLOOkUP to match same items from 1 wksht with the
other. "=VLOOKUP($H12,SLOW,2,FALSE)" if item of sht1 of cell H12
matches item in another sht with its range NAMED "SLOW" it should show
the value under the colume "2", in this case is "1", if not it should
show "0", but when there is no match it show "#NA" instead.

plshelp me.

thanks



--
Aladin Akyurek
------------------------------------------------------------------------
Aladin Akyurek's Profile: http://www.excelforum.com/member.php...fo&userid=4165
View this thread: http://www.excelforum.com/showthread...hreadid=273944