Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 116
Default Lookup returning incorrect value

I have a worksheet that has all of my inventory part numbers in column A. I
am using a lookup function requesting that on worksheet 2 it lookup the
partnumber and return the number of units sold in Jan 2007. If the part
number is not on the Jan 2007 page the formula is picking up a number anyway
rather than returning a 0. I'm not really sure why or where it's getting the
number from.

My formula is: =LOOKUP(A103,'2007 January'!A:A,'2007 January'!G:G). Thanks
in advance for your help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Lookup returning incorrect value

Hi Sherry -

From Excel's help file:

LOOKUP(lookup_value,lookup_vector,result_vector)

If LOOKUP can't find the lookup_value, it matches the largest value in
lookup_vector that is less than or equal to lookup_value.

I would suggest using either VLOOKUP or HLOOKUP to prevent your error.
Assuming your data is arranged in vertical columns, you can use VLOOKUP in
the following way:

=VLOOKUP(A103,'2007 January'!A:G,7,FALSE)

The 7 is the number of colums from left to right that the value you are
returning is from the First column of the data range. FALSE tells excel to
return only EXACT matches.

Does this work for you?

--
cmungs


"Sherry" wrote:

I have a worksheet that has all of my inventory part numbers in column A. I
am using a lookup function requesting that on worksheet 2 it lookup the
partnumber and return the number of units sold in Jan 2007. If the part
number is not on the Jan 2007 page the formula is picking up a number anyway
rather than returning a 0. I'm not really sure why or where it's getting the
number from.

My formula is: =LOOKUP(A103,'2007 January'!A:A,'2007 January'!G:G). Thanks
in advance for your help.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Lookup returning incorrect value

Try using VLOOKUP with the fourth parameter set to FALSE (or zero), so
you can get exact matches.

Hope this helps.

Pete

On Jan 29, 7:36*pm, Sherry wrote:
I have a worksheet that has all of my inventory part numbers in column A. *I
am using a lookup function requesting that on worksheet 2 it lookup the
partnumber and return the number of units sold in Jan 2007. *If the part
number is not on the Jan 2007 page the formula is picking up a number anyway
rather than returning a 0. *I'm not really sure why or where it's getting the
number from. *

My formula is: *=LOOKUP(A103,'2007 January'!A:A,'2007 January'!G:G). *Thanks
in advance for your help. *


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Lookup returning incorrect value

If the item is not present, then VLOOKUP will return a #N/A error, and
you will want to trap this and return 0 instead. Do it like this:

=IF(ISNA(vlookup_formula),0,vlookup_formula)

Hope this helps.

Pete

On Jan 29, 7:54*pm, Pete_UK wrote:
Try using VLOOKUP with the fourth parameter set to FALSE (or zero), so
you can get exact matches.

Hope this helps.

Pete

On Jan 29, 7:36*pm, Sherry wrote:



I have a worksheet that has all of my inventory part numbers in column A.. *I
am using a lookup function requesting that on worksheet 2 it lookup the
partnumber and return the number of units sold in Jan 2007. *If the part
number is not on the Jan 2007 page the formula is picking up a number anyway
rather than returning a 0. *I'm not really sure why or where it's getting the
number from. *


My formula is: *=LOOKUP(A103,'2007 January'!A:A,'2007 January'!G:G). *Thanks
in advance for your help. *- Hide quoted text -


- Show quoted text -


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 returning incorrect result btrotter Excel Worksheet Functions 1 June 7th 07 03:17 PM
lookup returning incorrect cell values stuartjk Excel Worksheet Functions 8 January 4th 07 09:09 AM
IF function returning incorrect result Hillary E. Excel Worksheet Functions 2 August 22nd 06 05:43 PM
formula returning incorrect blanks [email protected] Excel Worksheet Functions 6 March 9th 06 07:17 PM
formula returning incorrect blanks [email protected] Excel Discussion (Misc queries) 7 March 9th 06 07:15 PM


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

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

About Us

"It's about Microsoft Excel"