Is there a way to use regex substitution with Excel find & replace (in the GUI)?
Using a JavaScript example, I want to do something like this:
"John Smith".replace(/(.*)\s(\.*)/, "$2, $1") // returns "Smith, John"
|
Is there a way to use regex substitution with Excel find & replace (in the GUI)? Using a JavaScript example, I want to do something like this: |
||||
|
|
|
There is an add-on at www.codedawn.com that adds regexp functionality to MS Excel's find&replace dialog. That's the answer! Just one note: replacements made by this add-on are NOT UNDOABLE. You will be warned to save your workbook before committing replace. |
|||
|
|
I beleive you can get similar functionality combining Excel's FIND and MID functions - note that if what you're finding (the "\s" in your example) is a wildcard also, your function will probably get very long - but it's possible. See this article for some (fairly simple) examples. |
|||
|