passinthru
Board Regular
- Joined
- Jun 16, 2003
- Messages
- 185
In an old thread, I found what seems to be the solution I'm looking for, but I'm having trouble with the syntax. Member doofusboy suggested:
Range(your_cell_address_here).Value = Replace(Replace(Replace(Replace(Range(your_cell_address_here).Value," ","_"),"-",""),"(",""),")","")
This seemed to work for the OP on that thread.
However, when I try it in a macro, I get a "Type Mismatch" error.
Here's my code:
Range("A1:A2000").Value = Replace(Replace(Range("A1:A2000").Value, "ms TTL", "|ms TTL"), "time=", "time=|")
This is the first line of code, and it croaks right there. No joy.Can someone tell me what obvious mistake I've made?
The regular Search & Replace is not reliable, for reasons I mention in the original thread.
Range(your_cell_address_here).Value = Replace(Replace(Replace(Replace(Range(your_cell_address_here).Value," ","_"),"-",""),"(",""),")","")
This seemed to work for the OP on that thread.
However, when I try it in a macro, I get a "Type Mismatch" error.

Here's my code:
Range("A1:A2000").Value = Replace(Replace(Range("A1:A2000").Value, "ms TTL", "|ms TTL"), "time=", "time=|")
This is the first line of code, and it croaks right there. No joy.Can someone tell me what obvious mistake I've made?

The regular Search & Replace is not reliable, for reasons I mention in the original thread.
