How to extract state, zip code or city from address in Excel?
For extracting state, zip code or city from address cell to individual cells, what would you do? With this article, we will show you formulas to deal with this problem. Please browse for more details.
Recommended Productivity Tools for Excel
Office Tab: Bring powerful tabs to Office (include Excel), just like Chrome, Safari, Firefox and Internet Explorer. Save you half the time, and reduce thousands of mouse clicks for you. 30-day Unlimited Free Trial
Kutools for Excel: Save 71% of your time and solve 82% Excel problems for you. 300+ advanced tools designed for 1500+ work scenario, make Excel much easy and increase productivity immediately.60-day Unlimited Free Trial
Supposing the address locates in cell A2, please do as follows step by step to extract state, zip code or city from address in Excel.
1. Select a blank cell to place the extracted state. Here I select cell B2.
2. Copy and paste formula =MID(SUBSTITUTE(A2," ",""), FIND(",",SUBSTITUTE(A2," ",""))+8,2) into the Formula Bar, and then press the Enter key.
Then you will get the State in the selected cell.
1. In the formula, A2 is the cell which locates the full address;
2. The number 8 is the eighth character as well as the first character of the state after the first comma of the address;
3. The number 2 means that the state in this address just includes two characters. You can change the numbers based on your own address.
1. Select a blank cell, copy and paste formula =MID(SUBSTITUTE(A2," ",""), FIND(",",SUBSTITUTE(A2," ",""))+10,5) into the Formula Bar and press the Enter key.
Note: As the above notes mentioned, the number 10 in the formula is the tenth character after the first comma; and the number 5 means that there are five numbers constitute the zip code.
Please click How to extract postcode from address list in Excel? for more details of extract zip code from address.
For extracting the city from address, just change the last two numbers of the above formula to =MID(SUBSTITUTE(A2," ",""), FIND(",",SUBSTITUTE(A2," ",""))+1,6).