Lookup text or number string inside cell Excel 2010

Oz-Six-Oz

New Member
Joined
Nov 21, 2012
Messages
6
Hello everyone,

Okay, I'm new here and have no experience in Excel. I have tryed the forum, internet and Excel help without luck (Maybe don't know how to search), I want to do the normal lookup but searching a number or text string inside a row full of text.

For Example, I have in Sheet1:

ABCDE
1p6769705Lot# * 2-3182 ID lot 50643000="FORMULA HERE"
2p6769713** 2-3166 Filled with lot-50642992="FORMULA HERE"
3p6769756* 2-3182 LOT 50642917="FORMULA HERE"

<tbody>
</tbody>

Now in sheet2:

ABCDEFG
12-318211
22-318614
3322154511

<tbody>
</tbody>



I want to lookup value in Sheet2 A1 inside Sheet1 column B:B and then return in Sheet1 C:C the content in Sheet2 column B:B, is this possible?

For example for the first row in sheet1 C1 the result should be 11, since B1 has inside the cell value noted in Sheet 2 A1 "2-3182".

Please if you have the formula please explain it to me in detail how it works to understand it and apply it in the future, don't want just the formula to resolve this but to learn how to do it in the future understanding each part of the formula.

Tried Lookup and VLookup but these only search for exact cell, true? sorry if my question is dumb but i have tried everything and i'm frustrated with a headache now!

If a code is required then send me a link on how to make a code for dummies to not explain everything to me:)

Any help will be greatly appreciated

Thanks,

Oz
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hi Oz and welcome to the forum,

With Sheet2 as shown in your example, perhaps try this formula in C1 of Sheet1 (I have amended some of the values to better represent the results). Adjust the ranges as appropriate and drag down the formula as far as required:

Sheet1
ABC
1p6769705Lot# * 2-3182 ID lot 5064300011
2p6769756* 2-3186 LOT 5064291714
3p6769758322154511

<tbody>
</tbody>
Excel 2010
Worksheet Formulas
CellFormula
C1=LOOKUP(2, 1/SEARCH(Sheet2!A$1:A$3,B1), Sheet2!B$1:B$3)

<tbody>
</tbody>

<tbody>
</tbody>
Note:
 
Last edited:
Upvote 0
This is Magic!!! thanks Circled for the great help, one day I will be a master like you! Nice links, they explain everything in detail there but I'm less familiar to excel concepts plus my english is not perfect so to understand them I will take some classes before Christmas... :)
 
Last edited:
Upvote 0
This is Magic!!! thanks Circled for the great help, one day I will be a master like you! Nice links, they explain everything in detail there but I'm less familiar to excel concepts plus my english is not perfect so to understand them I will take some classes before Christmas... :)
You're welcome - thanks for the feedback! (I'm no master haha - but I hope you will be one day!)
 
Upvote 0
You guys are Great!, Aladin, thanks for your time and for spreading the knowledge with us. Do you want to read something funny? I'm the most experienced excel user in my company... (LOL), so i will be be posting some more questions, for sure i'm struggling 3 or 4 days with something before asking guys :p, with this help in this thread you save me like 8 hours of so manual work with Excel (I know what i'm talking about since i did it with a previous file). Conclusion, is great to have you here Circled/Aladin!
 
Upvote 0
You guys are Great!, Aladin, thanks for your time and for spreading the knowledge with us. Do you want to read something funny? I'm the most experienced excel user in my company... (LOL), so i will be be posting some more questions, for sure i'm struggling 3 or 4 days with something before asking guys :p, with this help in this thread you save me like 8 hours of so manual work with Excel (I know what i'm talking about since i did it with a previous file). Conclusion, is great to have you here Circled/Aladin!
Thanks Oz! I'm glad it saved you some time.

We can also avoid that real long number...

=LOOKUP(32768,SEARCH(Sheet2!A$1:A$3,B1),Sheet2!B$1:B$3)
T. Valko - also a master!

:) I've seen a few threads where you and Aladin discuss 9.99999999999999E+307. Personally, I prefer using the long number and think it is a reasonable choice as a convention for this class of formulae.

I think it helps to keep to a convention for these types of problems and the benefits outweigh the perceived 'ugliness'. It helps with maintainability and understandability in the long-term over, for example, arbitrarily large numbers that suit each situation which can conceal the underlying intent. Sticking to it as a standard may also mean people who see this type of formulae for the first time can find help a little more easily.

That's just my view, for now at least - and not that either of you care or should care about it! :LOL:

If anyone is interested, there is an article by Douglas Crockford that is very loosely related to this topic but talks a little bit about why programming (JavaScript) style is important. The first few general paragraphs are maybe somewhat applicable here:
The Elements of JavaScript Style
 
Last edited:
Upvote 0
Thanks Oz! I'm glad it saved you some time.


T. Valko - also a master!

:) I've seen a few threads where you and Aladin discuss 9.99999999999999E+307. Personally, I prefer using the long number and think it is a reasonable choice as a convention for this class of formulae.

I think it helps to keep to a convention for these types of problems and the benefits outweigh the perceived 'ugliness'. It helps with maintainability and understandability in the long-term over, for example, arbitrarily large numbers that suit each situation which can conceal the underlying intent. Sticking to it as a standard may also mean people who see this type of formulae for the first time can find help a little more easily.

That's just my view, for now at least - and not that either of you care or should care about it! :LOL:

If anyone is interested, there is an article by Douglas Crockford that is very loosely related to this topic but talks a little bit about why programming (JavaScript) style is important. The first few general paragraphs are maybe somewhat applicable here:
The Elements of JavaScript Style
I prefer to keep things simple! ;)
 
Upvote 0

Forum statistics

Threads
1,221,590
Messages
6,160,668
Members
451,662
Latest member
reelspike

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