#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default VLOOKUP Question

Good Afternoon,
I have a Vlookup question that may be very simple.

I have a named range "PriceList" as below:
A B C
Product Code Description Price
101 Chicken Lips $1.19
102 Choice Chicken Lips $1.99
107 Chicken Feet $1.12
108 Select Chicken Feet $1.60
109 Choice Chicken Feet $1.99
115 Chicken Knuckles $4.19
120 Chicken Wing Tips $0.19
121 Chicken Eyelids, Upper $5.19
123 Chicken Eyelids, Lower $17.19

I want a formula to return my message :"Product Code does not exist" if I
type in say, "103" as my Lookup Value instead of "#NA".
I want it to reflect the EXACT match of product code or my own error
message.

Thanks,
Mike Meyer


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default VLOOKUP Question

=IF(ISNA(VLOOKUP),"Product Code does not exist",VLOOKUP)


and the vlookup might look like

=VLOOKUP(H1,PriceList,2,0)

where H1 contains the product code, adjust the 2 to 3 if you want the price





"mjmeyer" wrote in message
...
Good Afternoon,
I have a Vlookup question that may be very simple.

I have a named range "PriceList" as below:
A B C
Product Code Description Price
101 Chicken Lips $1.19
102 Choice Chicken Lips $1.99
107 Chicken Feet $1.12
108 Select Chicken Feet $1.60
109 Choice Chicken Feet $1.99
115 Chicken Knuckles $4.19
120 Chicken Wing Tips $0.19
121 Chicken Eyelids, Upper $5.19
123 Chicken Eyelids, Lower $17.19

I want a formula to return my message :"Product Code does not exist" if I
type in say, "103" as my Lookup Value instead of "#NA".
I want it to reflect the EXACT match of product code or my own error
message.

Thanks,
Mike Meyer



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default VLOOKUP Question

Try this:

A1 = lookup_value

=IF(COUNTIF(INDEX(PriceList,,1),A1),VLOOKUP(A1,Pri ceList,3,0),"Product Code
does not exist")

--
Biff
Microsoft Excel MVP


"mjmeyer" wrote in message
...
Good Afternoon,
I have a Vlookup question that may be very simple.

I have a named range "PriceList" as below:
A B C
Product Code Description Price
101 Chicken Lips $1.19
102 Choice Chicken Lips $1.99
107 Chicken Feet $1.12
108 Select Chicken Feet $1.60
109 Choice Chicken Feet $1.99
115 Chicken Knuckles $4.19
120 Chicken Wing Tips $0.19
121 Chicken Eyelids, Upper $5.19
123 Chicken Eyelids, Lower $17.19

I want a formula to return my message :"Product Code does not exist" if I
type in say, "103" as my Lookup Value instead of "#NA".
I want it to reflect the EXACT match of product code or my own error
message.

Thanks,
Mike Meyer



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default VLOOKUP Question

Thank you VERY much!
Works like a charm!!!!

Mike



"Peo Sjoblom" wrote in message
...
=IF(ISNA(VLOOKUP),"Product Code does not exist",VLOOKUP)


and the vlookup might look like

=VLOOKUP(H1,PriceList,2,0)

where H1 contains the product code, adjust the 2 to 3 if you want the
price





"mjmeyer" wrote in message
...
Good Afternoon,
I have a Vlookup question that may be very simple.

I have a named range "PriceList" as below:
A B C
Product Code Description Price
101 Chicken Lips $1.19
102 Choice Chicken Lips $1.99
107 Chicken Feet $1.12
108 Select Chicken Feet $1.60
109 Choice Chicken Feet $1.99
115 Chicken Knuckles $4.19
120 Chicken Wing Tips $0.19
121 Chicken Eyelids, Upper $5.19
123 Chicken Eyelids, Lower $17.19

I want a formula to return my message :"Product Code does not exist" if I
type in say, "103" as my Lookup Value instead of "#NA".
I want it to reflect the EXACT match of product code or my own error
message.

Thanks,
Mike Meyer





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLOOKUP Question Rich K. Excel Discussion (Misc queries) 9 February 19th 07 10:15 PM
vlookup question Pakmount Excel Discussion (Misc queries) 1 October 21st 06 07:46 AM
Vlookup question ingleg Excel Discussion (Misc queries) 3 March 31st 06 03:56 PM
Vlookup question flourboy Excel Worksheet Functions 2 August 15th 05 09:10 PM
vlookup question please Bob Newman Excel Worksheet Functions 1 March 17th 05 06:25 AM


All times are GMT +1. The time now is 12:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"