VLOOKUP between company names and stock tickers

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
With you list of 3 company names in A1:C1, and your lookup values in A5:A7, you can lookup the company name as follows:

Code:
B2=VLOOKUP("*"&A5&"*",$A$1:$A$3,1,0)

Hope this helps
 
Upvote 0
This helped a lot thanks

Also is there anyway to get excel to look at the company and extract the shortened version in the cell next to it?
 
Upvote 0
This helped a lot thanks

Also is there anyway to get excel to look at the company and extract the shortened version in the cell next to it?

Is the ticker code included in a consistent way integrated in the company name string? The string after the ":" appears to be the stock exchange where the fund is listed.
Is the company name itself (without code and stock exchange) the search string?
 
Upvote 0
Is the ticker code included in a consistent way integrated in the company name string? The string after the ":" appears to be the stock exchange where the fund is listed.
Is the company name itself (without code and stock exchange) the search string?

The above is actually a bad example. The four below illustrate it much better so please can you look at those. The assumption should be that the information I want is before the ":" but after the final space " ". The exchange comes after the ":" and the stock can be and combination of 3 or 4 letters or numbers. I've tried to give a broad range of examples as follows: -

Aaron's Inc AAN:NYQ ------> AAN
Adamis Pharmaceuticals Corp CY3B:FRA -----> CY3B

<colgroup><col></colgroup><tbody>
</tbody>
Ab Dynamics PLC ABDP:LSE ------> ABDP

<colgroup><col></colgroup><tbody>
</tbody>
Adtec Plasma Technology Co Ltd 6668:TYO ------> 6668
Addus Homecare Corp A41:FRA ------> A41

<colgroup><col></colgroup><tbody>
</tbody>

<colgroup><col></colgroup><tbody>
</tbody>
 
Upvote 0
If the code is always 3 or 4 characters and preceded by a space, this should work:

Code:
=TRIM(RIGHT(LEFT(B11,FIND(":",B11)-1),4))

Where B11 is the cell with the full company name string
 
Upvote 0
If you have a maximum of 6 characters for the stock code, you can do this:

Code:
=RIGHT(RIGHT(LEFT(B7,FIND(":",B7)-1),6),LEN(RIGHT(LEFT(B7,FIND(":",B7)-1),6))-IFERROR(FIND(" ",RIGHT(LEFT(B7,FIND(":",B7)-1),6)),0))

It does assume that you have at least two characters before the last space that leads the ticker code. It gets a bit more interesting to debug though :)
The IFERROR is needed because FIND throws an error if it does not find a space.

Cheers,
JL
 
Upvote 0
It seems you have a list of tickers. Let's name the range housing the list TickerList.

Now invoke the following formula to determine which ticker is imbedded in each string containing a colon.

=LOOKUP(9.99999999999999E+307,SEARCH(" "&TickerList&":",$A2),TickerList)
 
Upvote 0
Aladin,

I think the OP wants to extract the ticker code from a text that has the company name, ticker code and exchange embedded in a single string. So he does not necessarily have the ticker code yet.

JL
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,007
Members
448,935
Latest member
ijat

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