ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Trying to do a Lookup (https://www.excelbanter.com/excel-worksheet-functions/174450-trying-do-lookup.html)

Heather C

Trying to do a Lookup
 
I'm trying to match a UPC # to an Item number on an invoice. I put the
formula in and it bring up thewrong item number. I'm not quite sure how to
fix this. The formula I'm using is
=IF (A200, LOOKUP(C20,Sheet1!A:A,Sheet1!B:B),"")

PLease HELP

Mike H

Trying to do a Lookup
 
Heather,

I assume you have a reson for only executuing your lookup if A20 0 because
it may be a bit unusual to check a value in your lookup vector but it's not
affecting the formula. In fact it works perfectly for me so can you expand
how it is going wrong.

Mike

"Heather C" wrote:

I'm trying to match a UPC # to an Item number on an invoice. I put the
formula in and it bring up thewrong item number. I'm not quite sure how to
fix this. The formula I'm using is
=IF (A200, LOOKUP(C20,Sheet1!A:A,Sheet1!B:B),"")

PLease HELP


PCLIVE

Trying to do a Lookup
 
Your UPC #s would have to be in ascending order for lookup to work. Instead
try using a MATCH function along with INDIRECT:

=INDIRECT("Sheet1!B" & MATCH(C20,Sheet1!A:A,0))

HTH,
Paul


--

"Heather C" <Heather wrote in message
...
I'm trying to match a UPC # to an Item number on an invoice. I put the
formula in and it bring up thewrong item number. I'm not quite sure how
to
fix this. The formula I'm using is
=IF (A200, LOOKUP(C20,Sheet1!A:A,Sheet1!B:B),"")

PLease HELP




Mike H

Trying to do a Lookup
 
Sorry an elderly moment your formula isn't on sheet 1 so your not checking a
value in your lookup vector. Last comment remains true, your formula works
perfectly for me so what is your error?

Mike

"Heather C" wrote:

I'm trying to match a UPC # to an Item number on an invoice. I put the
formula in and it bring up thewrong item number. I'm not quite sure how to
fix this. The formula I'm using is
=IF (A200, LOOKUP(C20,Sheet1!A:A,Sheet1!B:B),"")

PLease HELP


T. Valko

Trying to do a Lookup
 
Try this:

=IF(A200,VLOOKUP(C20,Sheet1!A:B,2,0),"")

--
Biff
Microsoft Excel MVP


"Heather C" <Heather wrote in message
...
I'm trying to match a UPC # to an Item number on an invoice. I put the
formula in and it bring up thewrong item number. I'm not quite sure how
to
fix this. The formula I'm using is
=IF (A200, LOOKUP(C20,Sheet1!A:A,Sheet1!B:B),"")

PLease HELP




Heather C[_2_]

Trying to do a Lookup
 
When the program look up the UPC number it is returning the worng item and I
don't know why?

"Mike H" wrote:

Heather,

I assume you have a reson for only executuing your lookup if A20 0 because
it may be a bit unusual to check a value in your lookup vector but it's not
affecting the formula. In fact it works perfectly for me so can you expand
how it is going wrong.

Mike

"Heather C" wrote:

I'm trying to match a UPC # to an Item number on an invoice. I put the
formula in and it bring up thewrong item number. I'm not quite sure how to
fix this. The formula I'm using is
=IF (A200, LOOKUP(C20,Sheet1!A:A,Sheet1!B:B),"")

PLease HELP



All times are GMT +1. The time now is 11:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com