• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1419
  • Last Modified:

Remove Special Characters - Excel VBA

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...

 Special-characters.xlsx

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

Thank you.
0
nainil
Asked:
nainil
1 Solution
 
CowboyJeeperCommented:
have you tried the clean function?

=clean(A2)
0
 
nainilAuthor Commented:
Wow, that works! excellent! Thank you!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now