Forum Discussion

kevmartin's avatar
kevmartin
Copper Contributor
Oct 19, 2019
Solved

Search/Replace With Wildcard without changing the wildcard characters

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

  • 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,"|")

2 Replies

  • 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,"|")
    • kevmartin's avatar
      kevmartin
      Copper Contributor
      Thank you - I think I can make that work 🙂

Resources