ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   stuck with VLOOKUP (https://www.excelbanter.com/excel-programming/315303-stuck-vlookup.html)

yimcw

stuck with VLOOKUP
 

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

plshelp me. :confused:

thank

--
yimc
-----------------------------------------------------------------------
yimcw's Profile: http://www.excelforum.com/member.php...fo&userid=1591
View this thread: http://www.excelforum.com/showthread.php?threadid=27394


Aladin Akyurek[_4_]

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. :confused:

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



All times are GMT +1. The time now is 10:55 AM.

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