Results 1 to 10 of 10

Data to coloumns - separate after zip code

Threaded View

ZUZ3L Data to coloumns - separate... 12-01-2010, 07:39 AM
watersev Re: Data to coloumns -... 12-01-2010, 08:36 AM
ZUZ3L Re: Data to coloumns -... 12-01-2010, 08:40 AM
Marcol Re: Data to coloumns -... 12-01-2010, 09:29 AM
ZUZ3L Re: Data to coloumns -... 12-01-2010, 10:01 AM
Marcol Re: Data to coloumns -... 12-01-2010, 10:44 AM
ZUZ3L Re: Data to coloumns -... 12-01-2010, 10:54 AM
Marcol Re: Data to coloumns -... 12-01-2010, 11:21 AM
ZUZ3L Re: Data to coloumns -... 12-02-2010, 02:18 AM
Marcol Re: Data to coloumns -... 12-02-2010, 05:53 AM
  1. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Data to coloumns - seperate after zip code

    Because your addresses are quite variable I think that a UDF might be the easiest solution.
    Option Explicit
    
    Function FindDanishPC(rng As Range)
        Dim n As Integer
        Dim arrSplit As Variant
    
        arrSplit = Split(rng, " ")
        FindDanishPC = ""
        For n = LBound(arrSplit) To UBound(arrSplit)
            If Len(arrSplit(n)) = 4 And IsNumeric(arrSplit(n)) Then
                FindDanishPC = arrSplit(n) * 1
            End If
        Next
    End Function
    Enter this in D2
    =FindDanishPC(B2)

    In C2
    =TRIM(LEFT(B2,SEARCH(D2,B2,1)-1))

    in E2
    =RIGHT(B2,LEN(B2)-SEARCH(D2,B2,1)-4)

    Drag/Fill these down as required.


    This will return the last group of 4 digits in the string.

    Hope this helps
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1