Results 1 to 3 of 3

2 letter country code within a string to full country name?

Threaded View

  1. #1
    Registered User
    Join Date
    06-15-2021
    Location
    VB
    MS-Off Ver
    365
    Posts
    2

    2 letter country code within a string to full country name?

    Hi!

    First time posting here. I have to generate daily reports from a program and format them, and I want to try and automate a small function in the report.

    I want to grab a 2 letter country code within a string in a cell and have excel spit out the actual name of the country in another column.

    Currently, I have =IF(ISBLANK(E6),"",VLOOKUP(E6,Table1[#All],2,)) which requires me to type in the 2 letter code in a column and excel spits out the full country name.

    The string I get in the report is "INT-TRAV-2021-06-13-GB--9999999" and I use the "GB" to determine the country. Sometimes the string contains a second country code that we ignore :"INT-TRAV-2021-06-13-DE-ES-9999999" (we only use "DE", we ignore "ES"). The last 7 digits vary because that is the personal identifier.

    Does excel has a function that will read the string, identify the 2 letter country code, and spit out the full country name in an adjacent column?

    Thanks,

    B
    Last edited by berserk539; 06-15-2021 at 11:10 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 12-16-2020, 07:23 AM
  2. Replies: 3
    Last Post: 01-13-2020, 05:20 PM
  3. Add name with country code
    By dibyendu2280 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-26-2019, 12:39 AM
  4. [SOLVED] Find a Country Name into a string.
    By Gauravsinghp in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-06-2014, 11:57 AM
  5. Extract a country name from the different String
    By amriali in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-23-2013, 06:25 AM
  6. Add ‘country name’ column to worksheet from a list of country codes.
    By Ben Morton in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2009, 09:24 AM
  7. Find a country against code
    By tqm1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-03-2007, 05:33 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1