Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Looking up a country name and copying to column 2

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Looking up a country name and copying to column 2

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.

--
HTH

Bob Phillips

"Jaco Jacobs" wrote in message
...
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Looking up a country name and copying to column 2

Bob,

I've tried this and it only shows the formula.

Jaco

"Bob Phillips" wrote:

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.

--
HTH

Bob Phillips

"Jaco Jacobs" wrote in message
...
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.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Looking up a country name and copying to column 2

Maybe your settings. Go to ToolsOptionsView and make sure that Formulas is
not checked.

--
HTH

Bob Phillips

"Jaco Jacobs" wrote in message
...
Bob,

I've tried this and it only shows the formula.

Jaco

"Bob Phillips" wrote:

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.

--
HTH

Bob Phillips

"Jaco Jacobs" wrote in message
...
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.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to sum the 3 best scores for every country in an contest? Håkan Excel Worksheet Functions 6 August 8th 09 07:09 AM
typing 'Up Country' ends up as Up Country' ? Martin ©¿©¬ @nohere.net Excel Discussion (Misc queries) 4 May 8th 09 06:32 PM
Show Country Name at Each Row SG Excel Worksheet Functions 2 August 5th 07 12:57 PM
Show Country Name in Each Row SG Excel Worksheet Functions 1 August 5th 07 11:10 AM
country list BigBloke Excel Discussion (Misc queries) 5 February 1st 07 09:22 PM


All times are GMT +1. The time now is 11:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"