Consulting

Results 1 to 2 of 2

Thread: extract sring from last space

  1. #1

    Post extract sring from last space

    if my F range has
    1935 E Bijou St 80909-5816
    3030 N Hancock Ave 80907-5761
    5490 Powers Center Pt. #148 80908

    i need to split from last space

    F range a
    1935 E Bijou St
    3030 N Hancock Ave
    5490 Powers Center Pt. #148
    G range as
    80909-5816
    80907-5761
    80908

    need a macro not equation

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    Select the cells you want splitting and run:[VBA]Sub blah()
    For Each cll In Selection.Cells
    cll.TextToColumns DataType:=xlFixedWidth, FieldInfo:=Array(Array(0, 2), Array(InStrRev(cll.Value, " "), 2))
    Next cll
    End Sub[/VBA]
    Last edited by p45cal; 06-06-2013 at 12:41 AM. Reason: changed so that numbers remained as text
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

Posting Permissions

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