Firefly2012
Well-known Member
- Joined
- Dec 28, 2011
- Messages
- 3,638
For those that enjoy playing with Regular Expressions, I hope you find the following Add-In useful:
https://skydrive.live.com/?cid=F5B94C37770FB324&id=F5B94C37770FB324!105
Download it to a location of your choice and install it in your Excel via Office button/File Ribbon>Options/Excel Options>Add-Ins>Manage Add-Ins.
How to use it
1. It adds an additional option to the right-click Cell menu (that should appear at the bottom) named "RegExp Tester".
2. Clicking on this will load a userform. The contents of the active cell are loaded into the large text box and you can also edit this text as you require, or clicking on another cell will load the contents of that cell to the box.
3. The above is the text you want to match against. The pattern to match with goes into the smaller textbox at the top. As soon as you start typing in a pattern, the match will be displayed in the larger text box in bold red underlined text.
4. There are 3 vbscript regular expression settings which can be made via checking the checkboxes on the right hand side. Please note that Multiline is an undocumented property of the vbscript regexp object.
5. There is a "Copy Pattern To Clipboad" button which copies the entered pattern to the clipboard.
6. Finally there is a further checkbox "Disable Match Text update" whose purpose is simply to disable automatic loading of a newly selected cell's contents to the larger textbox (this is useful in case you want to copy a pattern to the clipboard and enter it into a blank cell without losing the contents of the larger textbox).
Points to note
I have only tested this on xl2010. I have no other versions until I return to work to test against.
The userform contains Microsoft's InkEdit control. I have no idea how compatible this is with other Excel versions.
The userform uses Andy Pope's form resizing code (thank you Andy!) to permit dynamic resizing when the Userform has been loaded.
Please post any questions into this thread - thanks.
Hope it proves useful
https://skydrive.live.com/?cid=F5B94C37770FB324&id=F5B94C37770FB324!105
Download it to a location of your choice and install it in your Excel via Office button/File Ribbon>Options/Excel Options>Add-Ins>Manage Add-Ins.
How to use it
1. It adds an additional option to the right-click Cell menu (that should appear at the bottom) named "RegExp Tester".
2. Clicking on this will load a userform. The contents of the active cell are loaded into the large text box and you can also edit this text as you require, or clicking on another cell will load the contents of that cell to the box.
3. The above is the text you want to match against. The pattern to match with goes into the smaller textbox at the top. As soon as you start typing in a pattern, the match will be displayed in the larger text box in bold red underlined text.
4. There are 3 vbscript regular expression settings which can be made via checking the checkboxes on the right hand side. Please note that Multiline is an undocumented property of the vbscript regexp object.
5. There is a "Copy Pattern To Clipboad" button which copies the entered pattern to the clipboard.
6. Finally there is a further checkbox "Disable Match Text update" whose purpose is simply to disable automatic loading of a newly selected cell's contents to the larger textbox (this is useful in case you want to copy a pattern to the clipboard and enter it into a blank cell without losing the contents of the larger textbox).
Points to note
I have only tested this on xl2010. I have no other versions until I return to work to test against.
The userform contains Microsoft's InkEdit control. I have no idea how compatible this is with other Excel versions.
The userform uses Andy Pope's form resizing code (thank you Andy!) to permit dynamic resizing when the Userform has been loaded.
Please post any questions into this thread - thanks.
Hope it proves useful
Last edited: