+ Reply to Thread
Results 1 to 7 of 7

Macro for cutting text

  1. #1
    Registered User
    Join Date
    07-14-2015
    Location
    Poland
    MS-Off Ver
    2003
    Posts
    3

    Macro for cutting text

    Hi, Can someone write for me a macro that can cut the text to last "star"?

    GRU14 *******8.175,76
    LIS14 *******1.297,67
    PAZ14 *******2.474,68
    WRZ14 *******3.880,25
    SIE14 *******6.872,30
    LIP14 *******7.846,27
    CZE14 *******3.164,02
    MAJ14 *******1.960,11
    KWI14 *********919,35
    MAR14 *******1.414,14
    LUT14 *******2.714,29
    STY14 *********371,69

    I wont it to look like that:

    8.175,76
    1.297,67
    2.474,68
    3.880,25
    6.872,30
    7.846,27
    3.164,02
    919,35
    1.414,14
    2.714,29
    371,69

    Thank you above.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Macro for cutting text

    Hi, welcome to the forum

    Is that what your actual data looks like?

    Some have 7 *'s, others have 9?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    07-14-2015
    Location
    Poland
    MS-Off Ver
    2003
    Posts
    3

    Re: Macro for cutting text

    Yes and that is the problem

  4. #4
    Registered User
    Join Date
    07-14-2015
    Location
    Poland
    MS-Off Ver
    2003
    Posts
    3

    Re: Macro for cutting text

    It would be great if u can do at least something like that:

    *******8.175,76
    *******1.297,67
    *******2.474,68
    *******3.880,25
    *******6.872,30
    *******7.846,27
    *******3.164,02
    *******1.960,11
    *********919,35
    *******1.414,14
    *******2.714,29
    *********371,69

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Macro for cutting text

    Hi
    Try this formula
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  6. #6
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hi ! Try this !


    Data in A column, paste this demonstration to worksheet module :

    PHP Code: 
    Sub Demo()
        
    With Cells(1).CurrentRegion
            VA 
    = .Value
        
            
    For R& = 1 To UBound(VA)
                      
    SP Split(VA(R1), "*")
                
    VA(R1) = SP(UBound(SP))
            
    Next
            
            
    .Value VA
        End With
    End Sub 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,864

    Re: Macro for cutting text

    Try this:
    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. Text to columns is cutting out data
    By bmginnow in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-28-2014, 04:10 PM
  2. Replies: 7
    Last Post: 09-03-2013, 04:43 PM
  3. Replies: 1
    Last Post: 09-02-2013, 06:54 PM
  4. Excel2007, text cutting off at bottom of cell(s)
    By SPRoyLLC in forum Excel General
    Replies: 1
    Last Post: 05-13-2013, 12:55 PM
  5. Text cutting
    By faisal.ta in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-04-2013, 04:31 AM
  6. Excel 2007 : an excel row cutting off the bottom of text?
    By robbyvegas in forum Excel General
    Replies: 2
    Last Post: 07-16-2010, 11:34 AM
  7. cutting text
    By Aaron in forum Excel General
    Replies: 1
    Last Post: 12-15-2005, 12:15 PM

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