#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 896
Default Splitting up address

you might also try a function:

Function riplace(cell As Range, opcja As Integer) As String
For i = Len(cell) To 1 Step -1
If Mid(cell, i, 1) = Chr(32) Then
counter = counter + 1
If counter = 2 Then
If opcja = 1 Then
riplace = CStr(Left(cell, i - 1))
ElseIf opcja = 2 Then
riplace = Right(cell, Len(cell) - i)
End If
End If
End If
Next i
End Function

2nd argument of the function determins which part of an address to
retrieve:
1 is for 2/3, 2/3-4, Unit 2, 3, Unit 2/3
2 is for Some Street
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Splitting Address Info - Text to Columns betany70 Excel Discussion (Misc queries) 4 October 12th 07 09:54 PM
How do I avoid excel change absolute address to relative address Miguel Excel Discussion (Misc queries) 3 May 10th 07 11:18 PM
Splitting Numeric data from Text (Street Address Help) Cameron Excel Discussion (Misc queries) 2 December 5th 06 10:18 PM
Splitting comma separated lines of an address for mail merge. Chuda Excel Discussion (Misc queries) 1 September 12th 06 01:04 PM
How do I import Office address book to Outlook Express address bo. snnorp Excel Discussion (Misc queries) 2 February 22nd 05 11:47 AM


All times are GMT +1. The time now is 04:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"