+ Reply to Thread
Results 1 to 7 of 7

Function SpliText in a macro

  1. #1
    Forum Contributor
    Join Date
    12-19-2006
    Posts
    113

    Function SpliText in a macro

    Two months ago, DonkeyOte help me (http://www.excelforum.com/excel-prog...e-formula.html) solve a problem, with this function:
    Please Login or Register  to view this content.
    At that moment, everything works perfect because what I want is transform code numbers like this one
    0101010100
    into this
    01-01-01-01-00
    but suddenly start having different kind of code numbers like those
    5010301 ( ....which I want transform in this....: 05-01-03-01 )
    101050100 ( ....which I want transform in this....: 01-01-05-01-00 )
    0101010100 ( ....which I want transform in this....: 01-01-01-01-00 )
    02-02-04-00 ( ....which I want transform in this....: 02-02-04-00 )
    01.10.01.05.00 ( ....which I want transform in this....: 01-10-01-05-00 )

    Can somebody help me.
    Thanks in advance

    I attached the files which I.m using
    *I open the "testnew1" with the "Action"
    Attached Files Attached Files
    Last edited by Jokacave; 03-31-2009 at 01:40 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Function SpliText in a macro

    Perhaps you could adapt slightly...

    Please Login or Register  to view this content.
    No change to the call made from the cell just some additional code in the Function itself... for strings containing uneven number of chars it is assumed a leading zero is required (eg 11112 should be 011112 - ie to become 01-11-12)
    Last edited by DonkeyOte; 03-31-2009 at 07:07 AM.

  3. #3
    Forum Contributor
    Join Date
    12-19-2006
    Posts
    113

    Re: Function SpliText in a macro

    DonkeyOte,

    That worked perfectly well.
    By the way, do you know any addresses in the WWW where I can get any information about Functions?

    Thank you very much... once again.

  4. #4
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Function SpliText in a macro

    Good Morning, their is so much cool stuff on this site. How was the button made in the Action.xls file. I see it was a Auto shape item but being new too excel not sure how it works. If I not suppose too ask about it in this thread I sorry,I can ask in my own thread. I love reading and looking at all the projects here. There are so many smart people here. Even a old guy like me can learn new things. Just starting learning excel about a month ago, I have learned a lot from this great site.
    Thanks

  5. #5
    Forum Contributor
    Join Date
    12-19-2006
    Posts
    113

    Re: Function SpliText in a macro

    Hi,
    I.m not sure too if I can answer your question but...
    Yes, it is a AutoShape and with the mouse´s right-click I assign the macro XX, and yes, this is the right place to "old guys" like us learn about Excel.

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Function SpliText in a macro

    You can also make use of the ActiveX controls (rather than Forms controls) as these can be easier to work with - each ActiveX Control (button,checkbox etc) have their own specific event handlers

  7. #7
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Function SpliText in a macro

    Thanks Guys, it time for me to start playing with some stuff. Have a great day and Thank You for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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