Find and delete single character

K

KH_GS

Is there a function to find and delete a single character, lik
alphabet, or symbols like >, #, ', ?, ` , etc
 
N

nsv

Mark the area containing the unwanted character
Press CTRL H or click Find and Replace
Enter in the 'find' field the character you want to delete, but do not
enter anything in the 'replace' field
Click Replace All
 
B

Bill Ridgeway

Andy wrote <<You could use Find/Replace>> The problem is that it will not
find a "?" (and probably others) on its own.

Regards.

Bill Ridgeway
Computer Solutions
 
D

Dave Peterson

Excel's Edit|Find (and replace) supports wild cards.

If you want to find ?, use ~?
if you want to find *, use ~*
if you want to find ~, use ~~
 
B

Bill Ridgeway

Thanks Dave that's very useful to know. But why did Microsoft make it so
difficult? (rhetorical)

Regards.

Bill Ridgeway
Computer Solutions
 
G

Guest

Because they can?

Andy.

Bill Ridgeway said:
Thanks Dave that's very useful to know. But why did Microsoft make it so
difficult? (rhetorical)

Regards.

Bill Ridgeway
Computer Solutions
 
D

Dave Peterson

If MS is going to support wildcards, they need something to represent them (and
the DOS wildcards seem ok to me). But you do need something to indicate if
you're looking for that character or what the wildcard represents.

It seems like a pretty good way to me.
 
K

KH_GS

Hi All

I'm aware of the Find/Replace function, it didn't seem to allow me to
replace by with no character at first.. perhaps some mistake somewhere.
Thanks.
 
K

KH_GS

By the way

I have this line of code, it matched exactly words that ended with
"..d?".
How do I make it a wildcard function such that it ends with ".. d(any
character)" ?

For macro.
If Right(Words(i), 2) = "d?"
 
D

Dave Peterson

One way:

Dim myStr As String
myStr = "asdf"
If LCase(myStr) Like "*d?" Then
MsgBox "yep, next to last character is a d"
Else
MsgBox "nope"
End If

or

Dim myStr As String
myStr = "asdf"
If LCase(Mid(myStr, Len(myStr) - 1, 1)) = "d" Then
MsgBox "yep, next to last character is a d"
Else
MsgBox "nope"
End If

I used LCase to match D or d. Not sure if you wanted that.
 
K

KH_GS

How abt this, this symbol ' appear "invisible" on the excel sheet, the
tilde ~ doesn't seem to help. Any idea how to remove it? It sort of
occupies a cell, making it look blank, and "Go to" blank can't catch
it, how could I remove that?
 
Top