+ Reply to Thread
Results 1 to 3 of 3

Macro loop removing extra underscores XL 2010

  1. #1
    Registered User
    Join Date
    06-11-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    4

    Macro loop removing extra underscores XL 2010

    Version: Excel 2010

    Hi,

    I need to create a macro which loops over a range of cells and removes extra underscores from the cell contents. It would be nice if the macro could also remove any underscores that appear before and after the brackets. E.g. :

    ab_c becomes ab_c
    ab__c becomes ab_c
    a____________________b__c becomes a_b_c
    (_abc) becomes (abc)
    (ab__c_____) becomes (ab_c)

    I am having trouble figuring out how to do this, any help from the experts would be much appreciated!

    Thanks!!

    Dan

  2. #2
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    Re: Macro loop removing extra underscores XL 2010

    Please Login or Register  to view this content.
    I need to create a macro which loops over a range of cells ...
    Any particular range?

  3. #3
    Registered User
    Join Date
    06-11-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Macro loop removing extra underscores XL 2010

    Thanks this worked!

    I needed it for a certain range within a column, but I figured it out just as much

    Thanks for your help Steven!!

+ Reply to Thread

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