Lookup a value which is contained in a cell and return a value

jimmy13

New Member
Joined
May 14, 2012
Messages
5
Hi Guys,

I have a problem I cant find a solution too.

I have a table of stock codes with corresponding price list (exported from Sage), but on another sheet I would like ot lookup an abbreviated code and return the corresponding price. This means searching cells which contain a particular 4 digit number. I have attached a screen shot of what I am after.

Can anyone help?

Many thanks

Jim

7195220100_8fe4e479d9_m.jpg
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
What is relation between the Product Description and Product code?
 
Upvote 0
Basically the product codes are loacted within the product description as a 4 digit number. for example:
Product Code 1356 is related to cell A4 "0.3mm Olivine AFS30 in 25kg bags - 1356"
 
Upvote 0
Basically the product codes are loacted within the product description as a 4 digit number. for example:
Product Code 1356 is related to cell A4 "0.3mm Olivine AFS30 in 25kg bags - 1356"

Hi Jimmy, Is the 4 digit product code always at the end of the product description?
 
Upvote 0
Dear jimmy13,

try this formula
=INDEX($B$2:$B$16,MATCH(TRUE,ISNUMBER(SEARCH(E2,$A$2:$A$16)),0)) followed by Control+Shift+Enter
and drag it down

anand varma
 
Upvote 0
Dear jimmy13,

I am glad it helped you

thanks for the feedback,

Control+Shift+Enter is tells the Excel it is an array formula.
Since we have included the search function in the match formula.
anand varma
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,739
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top