Garbabled database cleanup.... seperating city, state, zip...

phanak

New Member
Joined
Jul 8, 2008
Messages
2
Normally this wouldn't be a problem if the database had correct delimiters, BUT I am running into a problem. Help?

In one cell I have CITY ST ZIP

Just like that... No comma, one space in between each one. I have seperated the state and zip, but the city is posing a problem, because some cities have two words in their name.

I HAVE been able to make ST and ZIP uniform, to where there is two characters and then a space and then 5 characters.

So I need to count backward 9 characters and take everything BEFORE those 9 characters. I am a newb to excel. I figured out the LEFT and RIGHT, but I need the OPPOSITE of left and right.

Please help. :)

Example data:

<table x:str="" style="border-collapse: collapse; width: 200pt;" border="0" cellpadding="0" cellspacing="0" width="267"><col style="width: 200pt;" width="267"> <tbody><tr style="height: 12.75pt;" height="17"> <td style="height: 12.75pt; width: 200pt;" height="17" width="267">DURHAM NC 27717</td> </tr> <tr style="height: 12.75pt;" height="17"> <td style="height: 12.75pt;" height="17">WATERTOWN CT 67950</td> </tr> <tr style="height: 12.75pt;" height="17"> <td style="height: 12.75pt;" height="17">ROCKINGHAM NC 28379</td> </tr> <tr style="height: 12.75pt;" height="17"> <td style="height: 12.75pt;" height="17">NORTH MYRTLE BEACH SC 29582</td> </tr> <tr style="height: 12.75pt;" height="17"> <td style="height: 12.75pt;" height="17">SUMMERFIELD NC 27358</td> </tr> <tr style="height: 12.75pt;" height="17"> <td style="height: 12.75pt;" height="17">ABINGDON VA 24210</td> </tr> <tr style="height: 12.75pt;" height="17"> <td style="height: 12.75pt;" height="17">WHITSETT NC 27377</td> </tr> <tr style="height: 12.75pt;" height="17"> <td style="height: 12.75pt;" height="17">GOLDSBORO NC 27533</td> </tr> <tr style="height: 12.75pt;" height="17"> <td style="height: 12.75pt;" height="17">TANNERSVILLE PA 18372</td> </tr> </tbody></table>
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
The opposite of LEFT and RIGHT?:unsure:

If you want the city/town try this.

=LEFT(A1,LEN(A1)-9)
 
Upvote 0
<html><head><title>Excel Jeanie HTML</title></head><body>

<!-- ######### Start Created Html Code To Copy ########## -->

Excel Workbook
ABCDE
1DURHAM NC 27717DURHAMNC27717
2NORTH MYRTLE BEACH SC 29582NORTH MYRTLE BEACHSC29582
Sheet2




<!-- ######### End Created Html Code To Copy ########## -->

</body></html>
 
Upvote 0
HA! Yea that was too easy for you guys. :) I've been slaving over this for over an hour! But hey, what better way to learn, right?

Thank you, THANK YOU for the help.
 
Upvote 0

Forum statistics

Threads
1,214,386
Messages
6,119,215
Members
448,874
Latest member
b1step2far

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