Remove Special Characters - Excel VBA

Posted on 2011-10-18
Last Modified: 2012-05-12
I have an excel sheet which has some special characters in the same.

I use a VBA macro to loop through each cell and trim the same (for white spaces).

ColumnLetter = A
RowCounter = Looped

ActiveSheet.Range(ColumnLetter & RowCounter).Value = Application.WorksheetFunction.Trim(ActiveSheet.Range(ColumnLetter & RowCounter).Value)

Open in new window

I am unaware of how to remove the special character. Attached is an excel sheet with the special characters which need to be cleaned...


How can one identify and remove the special character (question mark at the beginning of each cell) ?

Thank you.
Question by:nainil
    LVL 6

    Accepted Solution

    have you tried the clean function?


    Author Closing Comment

    Wow, that works! excellent! Thank you!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
    A short article about problems I had with the new location API and permissions in Marshmallow
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now