SOLVED

Sorting Counties into Districts

%3CLINGO-SUB%20id%3D%22lingo-sub-1393174%22%20slang%3D%22en-US%22%3ERe%3A%20Sorting%20Counties%20into%20Districts%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1393174%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F669275%22%20target%3D%22_blank%22%3E%40atwinte2%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESounds%20like%20VLOOKUP%20would%20do%20it.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAttach%20a%20sample%20of%20your%20data%20and%20I%20can%20take%20a%20look.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPeter%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1393211%22%20slang%3D%22en-US%22%3ERe%3A%20Sorting%20Counties%20into%20Districts%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1393211%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F667968%22%20target%3D%22_blank%22%3E%40peteryac60%3C%2FA%3E%26nbsp%3BHere%20is%20the%20sample%20data!%20The%20main%20issue%20I%20encounter%20is%20getting%20it%20to%20transfer%20from%20the%20sheet%20where%20I%20have%20the%20districts%20listed%20out%20to%20the%20next%20sheet%20over.%20If%20I%20do%20it%20on%20the%20same%20sheet%20as%20where%20the%20districts%20are%20it%20works%20fine%20but%20I%20don't%20know%20what%20syntax%20to%20use%20to%20get%20it%20to%20transfer%20across%20all%20the%20sheets%20in%20my%20file.%20Thanks%20for%20the%20response!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1393111%22%20slang%3D%22en-US%22%3ESorting%20Counties%20into%20Districts%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1393111%22%20slang%3D%22en-US%22%3E%3CP%3EHello!%20I%20had%20a%20question%20regarding%20a%20function%20that%20would%20turn%20counties%20into%20district%20codes%20automatically.%20Georgia%20is%20divided%20into%2018%20public%20health%20districts%20and%20I%20want%20to%20be%20able%20to%20type%20a%20county%20into%20one%20cell%20and%20have%20it%20automatically%20sort%20it%20into%20the%20proper%20public%20health%20district%20in%20the%20next%20cell%20over.%20I%20have%20a%20running%20list%20of%20all%20159%20counties%20with%20the%20district%20code%20for%20each%20county%20in%20the%20cell%20next%20to%20it.%20Would%20this%20involve%20VLOOKUP%20or%20a%20similar%20function%3F%20Thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1393111%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1393260%22%20slang%3D%22en-US%22%3ERe%3A%20Sorting%20Counties%20into%20Districts%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1393260%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F669275%22%20target%3D%22_blank%22%3E%40atwinte2%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20attach%20an%20example%20which%20I%20hope%20is%20what%20you%20want!%3C%2FP%3E%3CP%3EThe%20formula%20is%20more%20complicate%20county%20list%20on%20the%20second%20sheet%20all%20have%20the%20word%20COUNTY%20after%20them.%20So%20I%20have%20had%20to%20remove%20it%20in%20order%20for%20the%20VLOOKUP%20to%20work.%20If%20you%20remove%20the%20COUNTY%20word%20yourself%20then%20you%20can%20remove%20the%20MID(FIND(%20formulas%20from%20the%20lookup.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20this%20is%20what%20you%20want%20I%20would%20be%20grateful%20if%20you%20could%20mark%20this%20as%20a%20completed%20solution.%3C%2FP%3E%3CP%3Ethanks!%3C%2FP%3E%3CP%3EPeter%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

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!

3 Replies
Highlighted

@atwinte2 

Hi 

 

Sounds like VLOOKUP would do it. 

 

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

 

Peter

Highlighted

@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!

Highlighted
Best Response confirmed by atwinte2 (New Contributor)
Solution

@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