Removing the Comma in the city,state zip in a single cell

kmiller7home

New Member
Joined
Jun 17, 2015
Messages
23
I hope you can revive my faith in Excel Forums. I'm new to excel and I know this is a simple equation. How do I remove all comma's from the city, state zip cell in excel? There are some that don't have the comma but many do. There are also some spaces in there as well that need removed. Is there one formula that can remove all comma's and extra spaces? In the example below you see a comma and then below an extra space between ALLEN and KY. Hope you all in your INFINITE wisdom can help. :LOL:

I'm using Win7Pro and Excel 2013

ALGER, OH 45812
ALLEN KY 41601
ALLEN KY 41601
ALLEN KY 41601

Thank You

Kevin
 
I get it. I completely understand that section of the formula. That makes complete sense to me now. Thank you so much. Looking at other sections to make sure I get it. thank you again.

Kevin
 
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Just one additional thing: Trim also replaces multiple consecutive spaces within a string by a single space.
 
Upvote 0
City: =IF(LEFT(RIGHT(TRIM(A1),6),1)=" ", I get and understand the rest of this formula. Cant wrap my head around this one. I know you trim or remove all spaces from A1. I don't understand the 6 and the 1. What do those number represent? Been trying to figure this out!

KEvin
 
Upvote 0
Take the right hand 6 characters from A1 and look at the first of those. If it's a space, A1 ends with a 5 digit zip code, otherwise it must be a 9 digit one.
 
Upvote 0

Forum statistics

Threads
1,214,665
Messages
6,120,804
Members
448,990
Latest member
rohitsomani

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top