Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Find exact value using LOOKUP

I am attempting to use the LOOKUP function to give a numerical value for a
corresponding text. The problem is if the text is missing in the vector chart
it just defaults to the value for the text just one cell above where the text
would be (in abc order) if it were actually included in the chart.

For example:

=LOOKUP(B1,$AA$1:$AB$84)

And my chart is
AA AB (cell columns)
Apple 1000
Cat 2000
Dog 3000
Zebra 4000

Looking at my formula, if the word apricot is in the cell B1 then the value
will come out to 1000 because Apple is the highest value before where apricot
would have been (thinking in ABC order here). The problem is apricot is
really value 1500 but was left off of the chart.

I dont want the formula to do that, I want it to find the exact match or
give me some sort of error in the cell with the formula
[=LOOKUP(B1,$AA$1:$AB$84)] so that I know I need to add it to the vector
list.
Is there any way to make it look for the *exact* text as opposed to a range
per se?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 208
Default Find exact value using LOOKUP

Try using the vlookup function as below...

=VLOOKUP(B1,$AA$1:$AB$84,2,false)

On Jun 7, 3:46 pm, kawfeehaus
wrote:
I am attempting to use the LOOKUP function to give a numerical value for a
corresponding text. The problem is if the text is missing in the vector chart
it just defaults to the value for the text just one cell above where the text
would be (in abc order) if it were actually included in the chart.

For example:

=LOOKUP(B1,$AA$1:$AB$84)

And my chart is
AA AB (cell columns)
Apple 1000
Cat 2000
Dog 3000
Zebra 4000

Looking at my formula, if the word apricot is in the cell B1 then the value
will come out to 1000 because Apple is the highest value before where apricot
would have been (thinking in ABC order here). The problem is apricot is
really value 1500 but was left off of the chart.

I don’t want the formula to do that, I want it to find the exact match or
give me some sort of error in the cell with the formula
[=LOOKUP(B1,$AA$1:$AB$84)] so that I know I need to add it to the vector
list.
Is there any way to make it look for the *exact* text as opposed to a range
per se?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 360
Default Find exact value using LOOKUP

Populate the fourth argument of vlookup with false. If the exact value
isn't found, you'll get an #N/A.

Cliff Edwards

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Find exact value using LOOKUP

Use VLOOKUP and set the 4th argument to 0 or FALSE:

=VLOOKUP(B1,$AA$1:$AB$84,2,0)

In this case *exact* excludes case:

APPLE will be an "exact" match of apple.

If an "exact" match is not found the formula will return #N/A.


--
Biff
Microsoft Excel MVP


"kawfeehaus" wrote in message
...
I am attempting to use the LOOKUP function to give a numerical value for a
corresponding text. The problem is if the text is missing in the vector
chart
it just defaults to the value for the text just one cell above where the
text
would be (in abc order) if it were actually included in the chart.

For example:

=LOOKUP(B1,$AA$1:$AB$84)

And my chart is
AA AB (cell columns)
Apple 1000
Cat 2000
Dog 3000
Zebra 4000

Looking at my formula, if the word apricot is in the cell B1 then the
value
will come out to 1000 because Apple is the highest value before where
apricot
would have been (thinking in ABC order here). The problem is apricot is
really value 1500 but was left off of the chart.

I don't want the formula to do that, I want it to find the exact match or
give me some sort of error in the cell with the formula
[=LOOKUP(B1,$AA$1:$AB$84)] so that I know I need to add it to the vector
list.
Is there any way to make it look for the *exact* text as opposed to a
range
per se?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Find exact value using LOOKUP

Tim879 and ward376

Thanks! It works! I get #N/A when it is not present in the chart. This is a
big help!

K





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 360
Default Find exact value using LOOKUP

You're welcome.

Cliff Edwards
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 698
Default Find exact value using LOOKUP

In addition to the other solutions, if you don't want the #N/A to show in
your return cell, give this a try, adjust ranges to suit your sheet, as well
as what you want to be returned. In these cases its "nothing", "the value
zero" or "anything yoy want".

=IF(ISNA(VLOOKUP(C1,$A$1:$B$4,2,FALSE)),"",VLOOKUP (C1,$A$1:$B$4,2,FALSE))

=IF(ISNA(VLOOKUP(C1,$A$1:$B$4,2,FALSE)),"0",VLOOKU P(C1,$A$1:$B$4,2,FALSE))

=IF(ISNA(VLOOKUP(C1,$A$1:$B$4,2,FALSE)),"Any thing you want
here",VLOOKUP(C1,$A$1:$B$4,2,FALSE))

HTH
Regards,
Howard

"kawfeehaus" wrote in message
...
I am attempting to use the LOOKUP function to give a numerical value for a
corresponding text. The problem is if the text is missing in the vector
chart
it just defaults to the value for the text just one cell above where the
text
would be (in abc order) if it were actually included in the chart.

For example:

=LOOKUP(B1,$AA$1:$AB$84)

And my chart is
AA AB (cell columns)
Apple 1000
Cat 2000
Dog 3000
Zebra 4000

Looking at my formula, if the word apricot is in the cell B1 then the
value
will come out to 1000 because Apple is the highest value before where
apricot
would have been (thinking in ABC order here). The problem is apricot is
really value 1500 but was left off of the chart.

I don't want the formula to do that, I want it to find the exact match or
give me some sort of error in the cell with the formula
[=LOOKUP(B1,$AA$1:$AB$84)] so that I know I need to add it to the vector
list.
Is there any way to make it look for the *exact* text as opposed to a
range
per se?



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Find exact value using LOOKUP

Works Perfectly! Put yourself in for a raise, Howard....and I'll approve it.
Dave Stevens :-)

"L. Howard Kittle" wrote:

In addition to the other solutions, if you don't want the #N/A to show in
your return cell, give this a try, adjust ranges to suit your sheet, as well
as what you want to be returned. In these cases its "nothing", "the value
zero" or "anything yoy want".

=IF(ISNA(VLOOKUP(C1,$A$1:$B$4,2,FALSE)),"",VLOOKUP (C1,$A$1:$B$4,2,FALSE))

=IF(ISNA(VLOOKUP(C1,$A$1:$B$4,2,FALSE)),"0",VLOOKU P(C1,$A$1:$B$4,2,FALSE))

=IF(ISNA(VLOOKUP(C1,$A$1:$B$4,2,FALSE)),"Any thing you want
here",VLOOKUP(C1,$A$1:$B$4,2,FALSE))

HTH
Regards,
Howard

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 698
Default Find exact value using LOOKUP

Hey thanks, Dave S. Mailed in for the raise and I'm positive the
check-is-in-the-mail!!! (Discounted for misspelling the word "you" as
"yoy")

Thanks for the feedback.
Howard


"Dave The Favorite" wrote in
message ...
Works Perfectly! Put yourself in for a raise, Howard....and I'll approve
it.
Dave Stevens :-)

"L. Howard Kittle" wrote:

In addition to the other solutions, if you don't want the #N/A to show in
your return cell, give this a try, adjust ranges to suit your sheet, as
well
as what you want to be returned. In these cases its "nothing", "the
value
zero" or "anything yoy want".

=IF(ISNA(VLOOKUP(C1,$A$1:$B$4,2,FALSE)),"",VLOOKUP (C1,$A$1:$B$4,2,FALSE))

=IF(ISNA(VLOOKUP(C1,$A$1:$B$4,2,FALSE)),"0",VLOOKU P(C1,$A$1:$B$4,2,FALSE))

=IF(ISNA(VLOOKUP(C1,$A$1:$B$4,2,FALSE)),"Any thing you want
here",VLOOKUP(C1,$A$1:$B$4,2,FALSE))

HTH
Regards,
Howard



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
Lookup exact number stetka Excel Discussion (Misc queries) 4 October 26th 07 12:59 AM
Need to do an EXACT LOOKUP archsmooth Excel Worksheet Functions 1 June 4th 07 06:16 PM
Match - Exact - Lookup? Danny Excel Worksheet Functions 5 April 27th 06 10:04 PM
LookUp - Exact only Desparate Excel Worksheet Functions 2 November 11th 04 09:52 AM
LookUp - Exact only Desparate Excel Worksheet Functions 1 November 11th 04 09:45 AM


All times are GMT +1. The time now is 03:42 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"