+ Reply to Thread
Results 1 to 6 of 6

how can I create a code with name and id of countries that doesn't change when sort data?

Hybrid View

  1. #1
    Registered User
    Join Date
    05-17-2015
    Location
    Rotterdam, Netherlands
    MS-Off Ver
    2010
    Posts
    3

    how can I create a code with name and id of countries that doesn't change when sort data?

    Hi everyone! My problem is that I easily create a code for each country with the function CONCATENATE linking name and id; however when I want to sort by name of country again, all the data change as well as the code. For instance, if I sort these country by Name, Angola will have the code "AGO3" instead of "AGO2" and United Arab Emirates' id will drop down to the "U" id range. Any idea, pls?!

    Ex
    Afghanistan AFG 1 AFG1
    Angola AGO 2 AGO2
    Albania ALB 3 ALB3
    United Arab Emirates ARE 4 ARE4

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: how can I create a code with name and id of countries that doesn't change when sort da

    Can you attach an Excel sheet? It's not possible to tell what is in each cell from your example...
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    05-17-2015
    Location
    Rotterdam, Netherlands
    MS-Off Ver
    2010
    Posts
    3

    Re: how can I create a code with name and id of countries that doesn't change when sort da

    Attached
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: how can I create a code with name and id of countries that doesn't change when sort da

    Everything sorts perfectly on the sheet you posted....

  5. #5
    Registered User
    Join Date
    05-17-2015
    Location
    Rotterdam, Netherlands
    MS-Off Ver
    2010
    Posts
    3

    Re: how can I create a code with name and id of countries that doesn't change when sort da

    Yes but I don't know why it doesn't work in the file where I'm actually working. However, I'm pasting the columns again on my working-file and it's working. Thanks for the easy hint xD

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: how can I create a code with name and id of countries that doesn't change when sort da

    Glad to have helped... if I did!!!! If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. It'd also be appreciated if you were to click the add Reputation button at the foot of any of the posts of those who helped you reach a solution.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. code doesn't work when i change.
    By superchew in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-14-2015, 03:11 PM
  2. Replies: 4
    Last Post: 06-28-2014, 10:08 AM
  3. Get HTML Code into String from Newly clicked webpage (i.e. URL doesn't change)
    By bcbc123 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-11-2013, 11:39 PM
  4. Code Used to Work and Now It Doesn't - No Change in Book Though?
    By Jrub in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-03-2012, 06:35 AM
  5. VBA code that higlights countries in a Map
    By aeewing1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-13-2012, 10: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