Vlookup: search for number/txt within a long text

GaoShan

New Member
Joined
Sep 12, 2006
Messages
2
Hi guys,

I have looked for help in google and other forums for hours now and cannot find any help for my particular case.

I would like to combine search and vlookup: Since the value I am looking for is WITHIN a long text that is contained within a cell.

I tried to use wildcards with the lookup value but that only works sometimes. To give you an example here where it doesn't work:

cell content[A1]:"Error: Error Changing Business Partner (addresses) Module: BUPA_ADDRESS_CHANGE Vendor : 0001000228 No jurisdiction code could be determined 1000281 1000421 1000607 1000697 1001007 1003705 1004239 1005120 1005156 1005291 1006059 1006706 1006840 1007409 1007431 1007615 1008413 1008641 1008937 1009222 1009223 1009428 1009758 1010195 1010283 1010580 1010903 1010997 1012334 1012671 1013421 1013449 1013494 1014897 1015543 1016250 1016734 1016736 1016738 1017227 1017386 1018050 1018270 1018373 1018568 1019161 1019298 1019301 1019434 1019506 1019880 1019936 1020109 1020194 1020293 1020442 1020738 1020821 1020988 1021034 1021044 1021046 1021059 1025042 1025119 1025141 1025626 1026031 1026180 1026200 1026287 1026495 1026929 1026943 1027245 1027748 1027752 1029677 Error: Error Changing Business Partner (data) Module: BBP_BUPA_GET_NUMBER Vendor : 0001033149
"

lookup value [a3]:"1000228"

formula:"=VLOOKUP("*1000228*",$A$1:$B$11,2,FALSE)"
dynamic: "=vlookup("*"&A3&"*",$A$1:$B$11,2,FALSE)"

can you see what is wrong? when I search for the lookup value with Ctrl + F, then I can find the right cell. However, vlookup cannot. :(

thanks a lot for your suggestions!

bye
GaoShan
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Try...

=LOOKUP(9.99999999999999E+307,SEARCH(D1,$A$1:$A$11),$B$1:$B$11)

or

=INDEX($B$1:$B$11,MATCH(TRUE,ISNUMBER(SEARCH(D1,$A$1:$A$11)),0))

Note that the second formula needs to be confirmed with CONTROL+SHIFT+ENTER, not just ENTER. Also, note that LOOKUP finds the last occurrence within the lookup column, whereas INDEX/MATCH finds the first occurrence.

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,537
Members
449,088
Latest member
RandomExceller01

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