Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default Troubleshoot LOOKUP, please

Why does this lookup work sometimes, and sometimes not? Formula is:
=IF(D10="","",LOOKUP(D10,P:P,Q:Q)). Right now D10 is giving me the results
in the row above in column Q, if you understand what I mean. The data in D10
is found in P35 and instead of giving me Q35 data, it's giving me Q34. But,
it doesn't always do this. Sometimes it works beautifully. What gives?
Connie
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Troubleshoot LOOKUP, please

Connie Martin wrote:
Why does this lookup work sometimes, and sometimes not? Formula is:
=IF(D10="","",LOOKUP(D10,P:P,Q:Q)). Right now D10 is giving me the results
in the row above in column Q, if you understand what I mean. The data in D10
is found in P35 and instead of giving me Q35 data, it's giving me Q34. But,
it doesn't always do this. Sometimes it works beautifully. What gives?
Connie



LOOKUP(lookup_value,lookup_vector,result_vector)

The values in lookup_vector must be placed in ascending order: ...,-2, -1, 0, 1,
2, ..., A-Z, FALSE, TRUE; otherwise, LOOKUP may not give the correct value.
Uppercase and lowercase text are equivalent.

Is column P sorted?
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Troubleshoot LOOKUP, please

Try VLOOKUP instead with an exact match as below

=IF(D10="","",VLOOKUP(D10,P:Q,2,0))

If this post helps click Yes
---------------
Jacob Skaria


"Connie Martin" wrote:

Why does this lookup work sometimes, and sometimes not? Formula is:
=IF(D10="","",LOOKUP(D10,P:P,Q:Q)). Right now D10 is giving me the results
in the row above in column Q, if you understand what I mean. The data in D10
is found in P35 and instead of giving me Q35 data, it's giving me Q34. But,
it doesn't always do this. Sometimes it works beautifully. What gives?
Connie

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default Troubleshoot LOOKUP, please

Thank you, Jacob. That works better. Appreciate your help. Connie

"Jacob Skaria" wrote:

Try VLOOKUP instead with an exact match as below

=IF(D10="","",VLOOKUP(D10,P:Q,2,0))

If this post helps click Yes
---------------
Jacob Skaria


"Connie Martin" wrote:

Why does this lookup work sometimes, and sometimes not? Formula is:
=IF(D10="","",LOOKUP(D10,P:P,Q:Q)). Right now D10 is giving me the results
in the row above in column Q, if you understand what I mean. The data in D10
is found in P35 and instead of giving me Q35 data, it's giving me Q34. But,
it doesn't always do this. Sometimes it works beautifully. What gives?
Connie

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default Troubleshoot LOOKUP, please

Glenn, no, column P is not sorted. Does it have to be sorted for VLOOKUP,
as well?

"Glenn" wrote:

Connie Martin wrote:
Why does this lookup work sometimes, and sometimes not? Formula is:
=IF(D10="","",LOOKUP(D10,P:P,Q:Q)). Right now D10 is giving me the results
in the row above in column Q, if you understand what I mean. The data in D10
is found in P35 and instead of giving me Q35 data, it's giving me Q34. But,
it doesn't always do this. Sometimes it works beautifully. What gives?
Connie



LOOKUP(lookup_value,lookup_vector,result_vector)

The values in lookup_vector must be placed in ascending order: ...,-2, -1, 0, 1,
2, ..., A-Z, FALSE, TRUE; otherwise, LOOKUP may not give the correct value.
Uppercase and lowercase text are equivalent.

Is column P sorted?
.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Troubleshoot LOOKUP, please

No. The help file is your friend...


VLOOKUP(lookup_value,table_array,col_index_num,ran ge_lookup)

If range_lookup is TRUE, the values in the first column of table_array must be
placed in ascending order: ..., -2, -1, 0, 1, 2, ..., A-Z, FALSE, TRUE;
otherwise VLOOKUP may not give the correct value.

If range_lookup is FALSE, table_array does not need to be sorted.



The solution given by Jacob has range_lookup as 0, which Excel interprets the
same as false, which is why it worked for you.


Connie Martin wrote:
Glenn, no, column P is not sorted. Does it have to be sorted for VLOOKUP,
as well?

"Glenn" wrote:

Connie Martin wrote:
Why does this lookup work sometimes, and sometimes not? Formula is:
=IF(D10="","",LOOKUP(D10,P:P,Q:Q)). Right now D10 is giving me the results
in the row above in column Q, if you understand what I mean. The data in D10
is found in P35 and instead of giving me Q35 data, it's giving me Q34. But,
it doesn't always do this. Sometimes it works beautifully. What gives?
Connie


LOOKUP(lookup_value,lookup_vector,result_vector)

The values in lookup_vector must be placed in ascending order: ...,-2, -1, 0, 1,
2, ..., A-Z, FALSE, TRUE; otherwise, LOOKUP may not give the correct value.
Uppercase and lowercase text are equivalent.

Is column P sorted?
.

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
NETWORKDAYS Troubleshoot DOUG ECKERT[_2_] Excel Discussion (Misc queries) 8 September 2nd 08 02:22 PM
Troubleshoot help Whitney Excel Discussion (Misc queries) 3 April 3rd 08 11:03 PM
troubleshoot a workbook for me? [email protected] Excel Discussion (Misc queries) 1 November 22nd 05 07:01 PM
troubleshoot absolute value Sus Excel Worksheet Functions 3 October 27th 05 05:46 PM
Troubleshoot a bug in Excel [email protected] Excel Discussion (Misc queries) 1 October 17th 05 02:59 AM


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