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"

link|improve this question
feedback

2 Answers

up vote 1 down vote accepted

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.

link|improve this answer
Thanks, exactly what I was looking for - though I was surprised its not built-in. Actual link is codedawn.com/excel-add-ins.php. – studgeek Dec 3 '11 at 18:37
feedback

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.

link|improve this answer
Thanks, but I was actually looking for it in the GUI, which wasn't clear in my original question so I updated it. – studgeek Dec 3 '11 at 18:37
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.