# How to Separate City State and Zip from Address Using Excel Formula

While working with Microsoft Excel, sometimes, we have to separate an address into a street, city, state, and zip code. Separating an address into a city, state, and zip code using Excel formulas is an easy task. This is a time-saving task also. Today, in this article, we’ll learn four quick and suitable steps in how to separate city, state, and zip code from address using Excel formula effectively with appropriate illustrations.

## 4 Easy Steps to Separate City State and Zip from Address Using Excel Formula

Let’s assume we have an Excel worksheet that contains the information about several Addresses in column B.  The Address contains the Street, City, State, and Zip code. We will use the LEFT, MID, RIGHT, SUBSTITUTE, and FIND functions in Excel so that we can easily separate the Street, City, State, and Zip codes from the Address. Here’s an overview of the dataset for today’s task. ### Step 1: Combine LEFT and FIND Functions to Separate Street from Address

In this step, we will apply the LEFT and FIND functions to separate an address from a street, city, state, and zip code. This is an easy task. Let’s follow the instructions below to separate an address from a street, city, state, and zip code!

• First of all, select cell C5. • After selecting cell C5, type the below formula in that cell. The function is,
`=LEFT(B5, FIND(",",B5)-1)`

Formula Breakdown:

• Inside the FIND function “,” is the find_text, and B5 is the within_text of the FIND function.
• B5 is the text of the LEFT function, and FIND(“,”,B5)-1 is the num_chars of the LEFT function. • After typing the formula in Formula Bar, simply press Enter on your keyboard. As a result, you will get 269 Market Drive as the output of the functions. • Hence, AutoFill the LEFT and FIND functions to the rest of the cells in column C. ### Step 2: Merge MID, SUBSTITUTE, and FIND Functions to Separate City from Address

Now, we will apply the MID, SUBSTITUTE, and FIND functions to separate the city from the address. Let’s follow the instructions below to separate the city from the address!

• First, select cell D5, and write down the MID, SUBSTITUTE, and FIND functions to separate the city from the address of that cell.
`=MID(SUBSTITUTE(B5,"  "," "), FIND(",",SUBSTITUTE(B5,"  "," "))+1,10)` • After that, simply press Enter on your keyboard and you will get Morgantown as the output of the MID, SUBSTITUTE, and FIND functions. • Hence, AutoFill the MID, SUBSTITUTE, and FIND functions to the rest of the cells in column D. ### Step 3: Combine LEFT and RIGHT Functions to Separate State from Address

In this portion, we will merge the LEFT and the RIGHT functions to separate the state name from the address. This is an easy task. From our dataset, we will separate the state name from the address. Let’s follow the instructions below to separate the state from the address!

• First, select cell E5, and write down the LEFT and the RIGHT functions of that cell.
`=LEFT(RIGHT(B5,9),2)`

Formula Breakdown:

• Inside the RIGHT function, B5 is the text, and 9 is the num_chars of the RIGHT function.
• RIGHT(B5,9) is the text of the LEFT function, and 9 is the num_chars of the LEFT function. • Further, simply press Enter on your keyboard and you will get TX as the output of the LEFT and the RIGHT functions. • Hence, autoFill the LEFT and the RIGHT functions to the rest of the cells in column E. ### Step 4: Apply RIGHT Function to Separate Zip Code from Address

Last but not the least, we will apply the RIGHT function to separate the zip code from the address. We can easily separate the zip code from the address from our dataset using the RIGHT function. Let’s follow the instructions below to separate the zip code from the address!

• First, select cell F5, and write down the RIGHT function of that cell.
`=RIGHT(B5,5)`
• Where B5 is the text of the RIGHT function and 5 is the num_chars of the RIGHT function. • Hence, simply press Enter on your keyboard. As a result, you will get 75001 as the output of the RIGHT function. • Further, AutoFill the RIGHT function to the rest of the cells in column F which has been given in the below screenshot. ## Things to Remember

👉 While separating the city from an address, you can use the MID, SUBSTITUTE, and FIND functions. In this case, you have to change the character’s length basis on the address character.

👉 While a value can not found in the referenced cell, the #N/A error happens in Excel.

👉 #DIV/0! error happens when a value is divided by zero(0) or the cell reference is blank.

## Conclusion

I hope all of the suitable methods mentioned above to separate the street, city, state, and zip code from an address will now provoke you to apply them in your Excel spreadsheets with more productivity. You are most welcome to feel free to comment if you have any questions or queries.

## Related Articles #### Md. Abdur Rahim Rasel

Hi! I'm Md. Abdur Rahim Rasel. Welcome to my Profile. Currently, I am working and doing research on Microsoft Excel and here I will be posting articles related to this. I have completed my graduation in Naval Architecture and Marine Engineering(NAME) from Bangladesh University of Engineering and Technology(BUET). I have a passion for learning new things with my knowledge through perseverance and hard work.

We will be happy to hear your thoughts 