SOLVED

Search/Replace With Wildcard without changing the wildcard characters

Copper Contributor

Hello Brains Trust - I hope you can assist. I haven't been able to find the answer elsewhere.

 

I'm trying to do a search/replace, using wildcards to locate the target, but in the replace part of the action, I want to leave the wildcard characters as they were.

 

For example, find all cases of #??? (followed by a space) - then change the spaces to a pipe.

 

I thought I could use replace with: #???|

But that actually inserts question marks. Is there a way? It seems like it would be a very common need.

 

Thanks,

Kevin

2 Replies
best response confirmed by kevmartin (Copper Contributor)
Solution
You can't use wildcards in the Replace box, but you could use a formula in another column, to add the pipe. Then, copy the formula results, and paste as values over the original data. (Make a backup of your file first)
For example, if there's only one # in the original data, use this formula, where the data is in cell B3:
=REPLACE(B3,FIND("#",B3)+4,0,"|")
Thank you - I think I can make that work :)
1 best response

Accepted Solutions
best response confirmed by kevmartin (Copper Contributor)
Solution
You can't use wildcards in the Replace box, but you could use a formula in another column, to add the pipe. Then, copy the formula results, and paste as values over the original data. (Make a backup of your file first)
For example, if there's only one # in the original data, use this formula, where the data is in cell B3:
=REPLACE(B3,FIND("#",B3)+4,0,"|")

View solution in original post