Forum Discussion

atwinte2's avatar
atwinte2
Copper Contributor
May 15, 2020
Solved

Sorting Counties into Districts

Hello! I had a question regarding a function that would turn counties into district codes automatically. Georgia is divided into 18 public health districts and I want to be able to type a county into one cell and have it automatically sort it into the proper public health district in the next cell over. I have a running list of all 159 counties with the district code for each county in the cell next to it. Would this involve VLOOKUP or a similar function? Thanks!

  • atwinte2 

    Hi

     

    I attach an example which I hope is what you want!

    The formula is more complicate county list on the second sheet all have the word COUNTY after them. So I have had to remove it in order for the VLOOKUP to work. If you remove the COUNTY word yourself then you can remove the MID(FIND( formulas from the lookup.

     

    If this is what you want I would be grateful if you could mark this as a completed solution.

    thanks!

    Peter

     

3 Replies

  • peteryac60's avatar
    peteryac60
    Iron Contributor

    atwinte2 

    Hi 

     

    Sounds like VLOOKUP would do it. 

     

    Attach a sample of your data and I can take a look.

     

    Peter

    • atwinte2's avatar
      atwinte2
      Copper Contributor

      peteryac60 Here is the sample data! The main issue I encounter is getting it to transfer from the sheet where I have the districts listed out to the next sheet over. If I do it on the same sheet as where the districts are it works fine but I don't know what syntax to use to get it to transfer across all the sheets in my file. Thanks for the response!

      • peteryac60's avatar
        peteryac60
        Iron Contributor

        atwinte2 

        Hi

         

        I attach an example which I hope is what you want!

        The formula is more complicate county list on the second sheet all have the word COUNTY after them. So I have had to remove it in order for the VLOOKUP to work. If you remove the COUNTY word yourself then you can remove the MID(FIND( formulas from the lookup.

         

        If this is what you want I would be grateful if you could mark this as a completed solution.

        thanks!

        Peter

         

Resources