ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Vlookup (https://www.excelbanter.com/excel-worksheet-functions/138066-vlookup.html)

Ed Davis

Vlookup
 
Does anyone know how (when using vlookup) to only show a values if it
exists.
Example
Table looks like this

1245 betty
1249 joey


when I enter 1265 it should show nothing or "Not In Table"


Thanks in advance
ED


Pete_UK

Vlookup
 
Generally,

=IF(ISNA(vlookup_formula),"Not present",vlookup_formula)

Your vlookup_formula should have FALSE or 0 as the 4th argument so
that you are looking for an exact match.

Hope this helps.

Pete


On Apr 6, 1:42 am, "Ed Davis" wrote:
Does anyone know how (when using vlookup) to only show a values if it
exists.
Example
Table looks like this

1245 betty
1249 joey

when I enter 1265 it should show nothing or "Not In Table"

Thanks in advance
ED




Dave Peterson

Vlookup
 
=if(isna(match(a1,sheet2!a:a,0)),"not in table",vlookup(a1,sheet2!a:b,2,false))

Ed Davis wrote:

Does anyone know how (when using vlookup) to only show a values if it
exists.
Example
Table looks like this

1245 betty
1249 joey

when I enter 1265 it should show nothing or "Not In Table"

Thanks in advance
ED


--

Dave Peterson

Ed Davis

Vlookup
 
Thank you Dave
That worked great.


"Dave Peterson" wrote in message
...
=if(isna(match(a1,sheet2!a:a,0)),"not in
table",vlookup(a1,sheet2!a:b,2,false))

Ed Davis wrote:

Does anyone know how (when using vlookup) to only show a values if it
exists.
Example
Table looks like this

1245 betty
1249 joey

when I enter 1265 it should show nothing or "Not In Table"

Thanks in advance
ED


--

Dave Peterson



Pete_UK

Vlookup
 
Hi Ed,

try this:

=IF($A7=0,"",IF(ISNA(VLOOKUP($B7,$K$6:$Q$199,3,0)) ,"not
present",VLOOKUP($B7,$K$6:$Q$199,3,0)))

All one formula - beware of line wraps.

Hope this helps.

Pete


On Apr 6, 2:10 am, "Ed Davis" wrote:

Hi Pete
My formula looks like this.

=IF($A7<0,VLOOKUP($B7,$K$6:$Q$199,3),"")

When I try what you suggested I get too many arguments.

A1 I enter a qty and B7 is where I enter the number and K6:q199 is the
table.



On Apr 6, 1:55 am, "Pete_UK" wrote:
Generally,

=IF(ISNA(vlookup_formula),"Not present",vlookup_formula)

Your vlookup_formula should have FALSE or 0 as the 4th argument so
that you are looking for an exact match.

Hope this helps.

Pete

On Apr 6, 1:42 am, "Ed Davis" wrote:



Does anyone know how (when using vlookup) to only show a values if it
exists.
Example
Table looks like this


1245 betty
1249 joey


when I enter 1265 it should show nothing or "Not In Table"


Thanks in advance
ED- Hide quoted text -


- Show quoted text -





All times are GMT +1. The time now is 09:15 PM.

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