+ Reply to Thread
Results 1 to 8 of 8

Remove Special Character(s)

  1. #1
    Registered User
    Join Date
    11-28-2011
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    73

    Remove Special Character(s)

    I have searched the web and this forum for the answer and came up with "close but no cigar". Closest lookup value I could get to work was "Special Characters" and there appears to be over 1,500 entries but could not get past the first page without throwing a forum error. I am sure this has been covered so I apologize for bringing it up again.

    Sheet has some cells that contain a "-" before the number. I need to remove the "-" from the entire sheet. I have been working with a variable of something like this.... but I am well aware that my skills are limited and this does not work.

    Thanks,
    Last edited by joshag; 06-26-2019 at 11:15 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,466

    Re: Remove Special Character(s)

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Remove Special Character(s)

    Possibly...
    Please Login or Register  to view this content.

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

    Re: Remove Special Character(s)

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    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

  5. #5
    Registered User
    Join Date
    11-28-2011
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    73

    Re: Remove Special Character(s)

    The offending matter has been removed so I can hopefully get back to the original question. I need VBA code to remove the "-" before numbers that appear on a spreadsheet like this -4763 because the method I am using does not work. I'm sorry I did not post an example but this is a private, secure workbook that I cannot share and did not think it would be necessary due to the original explanation.

    Thank you,

  6. #6
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,529

    Re: Remove Special Character(s)

    A little shy on information.
    Are the cells in question only numbers as you indicated (-4142), nothing else in that cell?
    Are the cells formatted as Numbers, Text, or what?
    Or are these numbers part of a string like "The magic number is -4142 and it needs to be changed to a possitive value."
    Give us all the info you have.

  7. #7
    Registered User
    Join Date
    11-28-2011
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    73

    Re: Remove Special Character(s)

    dangelor - Thank you. This was so easy it made my original "forbidden" code snippet seem like an overkill.

  8. #8
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Remove Special Character(s)

    Glad I could help.

+ 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. Remove special character from Column
    By saravanan1981 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-18-2016, 04:52 AM
  2. Remove Special Character (~)
    By KTM450 in forum Excel General
    Replies: 5
    Last Post: 01-06-2016, 07:01 PM
  3. Remove all text after the third ocurance of a special character
    By nguerra in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-24-2014, 06:00 PM
  4. remove a special character using VBA
    By phwjr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-06-2013, 02:33 PM
  5. how to remove the * special character in excel
    By mohan_srijaya in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-14-2013, 06:26 PM
  6. Macros to remove a special character and all the characters after that....
    By Umapathy kumar in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-07-2013, 01:27 AM
  7. remove special character at end of string
    By captain bob in forum Excel General
    Replies: 0
    Last Post: 08-03-2006, 09:59 AM

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