#1   Report Post  
Jeanette
 
Posts: n/a
Default Lookup

I created a lookup formula - LOOKUP(C:C,'UPIN INDEX'!A:A,'UPIN INDEX'!B:B),
the formula works as desired, except when the number being looked up doesn't
exist it doesn't come back with FALSE, it fills the blank with the number and
name just preceding. How do I change this?
  #2   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

If A:B on UPIN INDEX is sorted in ascending order and can be kept as
such, try:

=IF(LOOKUP(C2,'UPIN INDEX'!$A$2:$A$1500)=C2,LOOKUP(C2,'UPIN
INDEX'!$A$2:$B$1500),"")

Otherwise, try:

=VLOOKUP(C2,'UPIN INDEX'!A:B,2,0)

Jeanette wrote:
I created a lookup formula - LOOKUP(C:C,'UPIN INDEX'!A:A,'UPIN INDEX'!B:B),
the formula works as desired, except when the number being looked up doesn't
exist it doesn't come back with FALSE, it fills the blank with the number and
name just preceding. How do I change this?


--

[1] The SumProduct function should implicitly coerce the truth values to
their Excel numeric equivalents.
[2] The lookup functions should have an optional argument for the return
value, defaulting to #N/A in its absence.
  #3   Report Post  
Jeanette
 
Posts: n/a
Default

Worked like a DREAM ;-)

"Aladin Akyurek" wrote:

If A:B on UPIN INDEX is sorted in ascending order and can be kept as
such, try:

=IF(LOOKUP(C2,'UPIN INDEX'!$A$2:$A$1500)=C2,LOOKUP(C2,'UPIN
INDEX'!$A$2:$B$1500),"")

Otherwise, try:

=VLOOKUP(C2,'UPIN INDEX'!A:B,2,0)

Jeanette wrote:
I created a lookup formula - LOOKUP(C:C,'UPIN INDEX'!A:A,'UPIN INDEX'!B:B),
the formula works as desired, except when the number being looked up doesn't
exist it doesn't come back with FALSE, it fills the blank with the number and
name just preceding. How do I change this?


--

[1] The SumProduct function should implicitly coerce the truth values to
their Excel numeric equivalents.
[2] The lookup functions should have an optional argument for the return
value, defaulting to #N/A in its absence.

  #4   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

Glad to help. Just a note: When A:B is sorted on A, the LOOKUP formula
is way faster than the VLOOKUP formula with the match-type set to 0.
That's why I also suggested a LOOKUP formula wrt your previous question
instead of an IF formula with at least 3 functions...

Jeanette wrote:
Worked like a DREAM ;-)

"Aladin Akyurek" wrote:


If A:B on UPIN INDEX is sorted in ascending order and can be kept as
such, try:

=IF(LOOKUP(C2,'UPIN INDEX'!$A$2:$A$1500)=C2,LOOKUP(C2,'UPIN
INDEX'!$A$2:$B$1500),"")

Otherwise, try:

=VLOOKUP(C2,'UPIN INDEX'!A:B,2,0)

Jeanette wrote:

I created a lookup formula - LOOKUP(C:C,'UPIN INDEX'!A:A,'UPIN INDEX'!B:B),
the formula works as desired, except when the number being looked up doesn't
exist it doesn't come back with FALSE, it fills the blank with the number and
name just preceding. How do I change this?


--

[1] The SumProduct function should implicitly coerce the truth values to
their Excel numeric equivalents.
[2] The lookup functions should have an optional argument for the return
value, defaulting to #N/A in its absence.


--

[1] The SumProduct function should implicitly coerce the truth values to
their Excel numeric equivalents.
[2] The lookup functions should have an optional argument for the return
value, defaulting to #N/A in its absence.
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 more than one cell andrewm Excel Worksheet Functions 20 June 14th 05 05:33 AM
Lookup Vector > Lookup Value Alec Kolundzic Excel Worksheet Functions 6 June 10th 05 02:14 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
Lookup function w/Text and Year Josh O. Excel Worksheet Functions 1 February 12th 05 11:27 PM
double lookup, nest, or macro? Josef.angel Excel Worksheet Functions 1 October 29th 04 09:50 AM


All times are GMT +1. The time now is 09:19 AM.

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"