+ Reply to Thread
Results 1 to 6 of 6

How to get the space base on the number afters ?

Hybrid View

  1. #1
    Registered User
    Join Date
    10-20-2012
    Location
    hong kong
    MS-Off Ver
    Excel 2007
    Posts
    84

    How to get the space base on the number afters ?

    Dear Experts

    I have too many wording which on columns "w" to wanna get SPACE base on a numbers TO SPLIT.

    For example
    "KERRYWAREHOUSE *2KERRYWAREHOUSE*3KERRYWAREHOUSE*4"

    Result
    "KERRYWAREHOUSE *2 KERRYWAREHOUSE*3 KERRYWAREHOUSE*4"

    can it be do by macros ?
    please help as i highly appreciate

  2. #2
    Registered User
    Join Date
    10-20-2012
    Location
    hong kong
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: How to get the space base on the number afters ?

    Quote Originally Posted by ks1102 View Post
    Dear Experts

    I have too many wording which on columns "w" to wanna get SPACE base on a numbers TO SPLIT.

    For example
    "KERRYWAREHOUSE *2KERRYWAREHOUSE*3KERRYWAREHOUSE*4"

    Result
    "KERRYWAREHOUSE *2 KERRYWAREHOUSE*3 KERRYWAREHOUSE*4"

    can it be do by macros ?
    please help as i highly appreciate
    i have trying code as "
            avarSplit = Split(Cells(aa, 23).Value, "1", "2", "3", "4", "5", "6")
        For intIndex = LBound(avarSplit) To UBound(avarSplit)
    but it's error

  3. #3
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: How to get the space base on the number afters ?

    i found this one maybe it could help

    Public Function AddSpaces(r As String) As String
    Dim s As String
    With CreateObject("vbscript.regexp")
        .Pattern = "([a-z]|\d)([A-Z])"
        .Global = True
        s = .Replace(r, "$1 $2")
    End With
    AddSpaces = s
    End Function
    Formula: copy to clipboard
    =AddSpaces(A1)


    NOT MY CODE. It say it's from MOREFUNC.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  4. #4
    Registered User
    Join Date
    10-20-2012
    Location
    hong kong
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: How to get the space base on the number afters ?

    Quote Originally Posted by vlady View Post
    i found this one maybe it could help

    Public Function AddSpaces(r As String) As String
    Dim s As String
    With CreateObject("vbscript.regexp")
        .Pattern = "([a-z]|\d)([A-Z])"
        .Global = True
        s = .Replace(r, "$1 $2")
    End With
    AddSpaces = s
    End Function
    Formula: copy to clipboard
    =AddSpaces(A1)


    NOT MY CODE. It say it's from MOREFUNC.

    Thanks the advise but how to use this code ?

  5. #5
    Registered User
    Join Date
    10-20-2012
    Location
    hong kong
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: How to get the space base on the number afters ?

    Quote Originally Posted by ks1102 View Post
    Thanks the advise but how to use this code ?
    yeah i find how to used and it work perfectly .
    thxx

  6. #6
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: How to get the space base on the number afters ?

    Nice!

    Regards,
    Vlady

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Base Number Extraction
    By jr_smith in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 07-30-2012, 10:53 AM
  2. converting number with space into a normal number
    By przemke in forum Excel General
    Replies: 6
    Last Post: 01-04-2010, 03:05 PM
  3. Other Number Base Systems
    By Lost Ninja in forum Excel General
    Replies: 5
    Last Post: 03-26-2009, 04:28 PM
  4. How do I set the number format to Base 12?
    By Andrew Moore in forum Excel General
    Replies: 1
    Last Post: 01-02-2006, 07:20 PM
  5. [SOLVED] Can you change the base number from 100 to something else with %'s
    By Jarod in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-19-2005, 10:06 PM

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