Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Fri, 9 Feb 2007 03:32:05 +0000, sudkool
wrote: Hi, I have full address in once cell and I was just wondering if there any way to un-concatenate it in all different cells. Here is the example Cell A1 16545 Dingo St suite 656 Chicago, IL 54545 Please help me if you know how to save all of that cell into 5 different cells (address1, address2, city, state, address). Thank you so much in advance Assuming the format is somewhat similar to what you have posted, you could use Regular Expressions. The formulas assume that address2 will be a blank line if not present. The formulas also assume that the STATE is always characterized by the sequence <comma<space<capltr<capltr<space Download and install Longre's free morefunc.xll add-in from http://xcell05.free.fr It is easily distributable with the workbook, if that is an issue. Then use these formulas: address1: =REGEX.MID($A1,".*") address2: =REGEX.MID($A1,".*",2) city: =REGEX.MID($A1,".*(?=,\s[A-Z]{2}\s)") state: =REGEX.MID($A1,"(?<=,\s)[A-Z]{2}(?=\s)") zip: =REGEX.MID($A1,"(?<=,\s[A-Z]{2}\s).*") --ron |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how can i convert an email address to a web address | Excel Worksheet Functions | |||
Hyperlink Address and SubAddress not concatenating correctly | Excel Discussion (Misc queries) | |||
Formular to add to a IP address | Excel Discussion (Misc queries) | |||
MIN Function w/ variable address reference | Excel Worksheet Functions | |||
How do I import Office address book to Outlook Express address bo. | Excel Discussion (Misc queries) |