LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Eliminate wild characters

Give this function a try...

Function WildcardsToSpaces(ByVal S As String) As String
Dim X As Long
Const Wildcards As String = "~!@#$%^&*()"
For X = 1 To Len(Wildcards)
S = Replace(S, Mid(Wildcards, X, 1), " ")
Next
WildcardsToSpaces = S
End Function

--
Rick (MVP - Excel)


"MrRJ" wrote in message
...
Hi,
Is there a VBA code to eliminate wild characters ~!@#$%^&*() and replacing
them with a space?
I found this on this site and looks like it could work but need to
incoporate the wild characters and in a specific column.

Function RemAlpha(str As String) As String
With CreateObject("VbScript.RegExp")
.Global = True
.IgnoreCase = True
.Pattern = "[A-Z]"
RemAlpha = .Replace(str, vbNullString)
End With
End Function

I appreciate any help you can give.




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wild characters in function? Steven Excel Worksheet Functions 3 November 4th 09 11:24 PM
Eliminate wild characters MrRJ Excel Discussion (Misc queries) 5 April 15th 09 10:21 PM
Countif using Wild Card Characters nebb Excel Worksheet Functions 2 February 11th 06 12:14 AM
Using wild characters for an array Steven Excel Discussion (Misc queries) 2 February 9th 05 04:29 PM
Using wild card characters in array formulas PJB Shark Excel Worksheet Functions 3 January 19th 05 03:09 PM


All times are GMT +1. The time now is 12:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"