Looking up a country name and copying to column 2

G

Guest

I have a spreadsheet and in column A there is a list like this

LBYBNKLTD Libya BN.KLT.DINV.CD Foreign direct investment, net (BoP, current
US$)

The second word in is always a country and changes. I would like to know if
there is a macro and what would the macro be to look up the name of the
country (That will always be the same ammount of characters in) and paste the
name of the country into column B. There are 3600 rows in the spreadsheet.

Hope anyone can help with this.
 
B

Bob Phillips

Jaco,

You don't need a macro. Add this formula to B1

=MID(A1,FIND(" ",A1)+1,FIND(" ",A1,FIND(" ",A1)+1)-FIND(" ",A1)-1)

and copy down.
 
B

Bob Phillips

Maybe your settings. Go to Tools>Options>View and make sure that Formulas is
not checked.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top