Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() try this Sub test() Addr = "AAINEY J 1193 STRATHCONA DR SW CALGARY, AB T3H4S1 (403) 293-2671 (403) 293-2671" CommaPosition = InStr(Addr, ",") 'remove everything left of the comma City = Trim(Left(Addr, CommaPosition - 1)) LastSpace = InStrRev(City, " ") City = Mid(City, LastSpace + 1) Providence = Trim(Mid(Addr, CommaPosition + 1)) Firstspace = InStr(Providence, " ") Providence = Left(Providence, Firstspace - 1) End Sub -- joel ------------------------------------------------------------------------ joel's Profile: http://www.thecodecage.com/forumz/member.php?u=229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=206222 http://www.thecodecage.com/forumz |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Text parsing HELP | Excel Discussion (Misc queries) | |||
Parsing | Excel Discussion (Misc queries) | |||
Instead of Parsing | Excel Discussion (Misc queries) | |||
Parsing a name | Excel Programming | |||
Parsing help | Excel Programming |