View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Replace with total

Hi Juan,

In order to replace the asterisk (*) symbol. I beleive tha you need to use
use the two symbol combination
~*
If you use the asterisk alone, it will be interpreted as a wildcard.

You can do this manually or in vba:

Sub ReplaceAsteriskSpace()
Dim cell As Range

For Each cell In Selection
cell.Replace What:="~*", Replacement:="Total", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False
cell.Value = Application.Trim(cell.Value)
Next
End Sub

---
Regards,
Norman

"Juan" wrote in message
...
Hello all,
I have in Column A customers that have a * and two extra
spaces.These customers that contain such thing is the
total for that customer . Example,
Column A
* Test Tech
* tech is this

Is it possible to replace the *Spacespace to Total?Exa,
Total Test Tech
Total tech is this

If I do the Find Replace, it will cause some errors
because of the * and space.
Please advise any help.
Thanks,
Juan