VLOOKUP between company names and stock tickers

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

This works well. There are the odd instances where it doesn't work but it is good enough for what I am trying to do.

Finally I am also looking to create another column where I can leave the stock ticker plus the exchange so Yahoo finance will recognise it as follows: -

Adamis Pharmaceuticals Corp CY3B:FRA -----> CY3B.F

<tbody>
</tbody>

Ab Dynamics PLC ABDP:LSE ------> ABDP.L

<tbody>
</tbody>

Adler Real Estate AG ADLX:GER-----> ADL.DE

AB Science SA AB:PAR----> AB.PA




<tbody>
</tbody>
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
This works well. There are the odd instances where it doesn't work but it is good enough for what I am trying to do.

Finally I am also looking to create another column where I can leave the stock ticker plus the exchange so Yahoo finance will recognise it as follows: -

Adamis Pharmaceuticals Corp CY3B:FRA -----> CY3B.F

<tbody>
</tbody>
Ab Dynamics PLC ABDP:LSE ------> ABDP.L

<tbody>
</tbody>

Adler Real Estate AG ADLX:GER-----> ADL.DE

AB Science SA AB:PAR----> AB.PA



<tbody>
</tbody>

What is the rule to change the exchange code to the short version shown in your example?
The first two examples take just the first letter, but the third one changes the code altogether and the fourth example leaves two letters.
If that is indeed what needs to happen, you may want to set up a separate lookup table.
 
Upvote 0
Yes I tried to give a range of examples. I will know the from to so I think what I need is a find and replace within the string for all the different examples for the end part tenprevious cide for the front end.

find GER replace DE find PAR replace PA etc.
 
Upvote 0
Yes I tried to give a range of examples. I will know the from to so I think what I need is a find and replace within the string for all the different examples for the end part tenprevious cide for the front end.

find GER replace DE find PAR replace PA etc.

Can't you confirm whether you have a list of stickers or not?
 
Upvote 0
I guess you could use this to find the front part:

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

and this to find the aft part:

Code:
=RIGHT(B2,LEN(B2)-FIND(":",B2)+1)

You can then concatenate the strings. I'm not sure how you would do the replacements automatically without a cross-reference list.
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,262
Members
449,075
Latest member
staticfluids

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