marku24
asked on
Reverse Find in Excel
I have a text string, let's say it is "test this, string". I can find the position of the comma (position 10) and need to know at what position the space appears BEFORE the comma (this would be position 5). Can I use a reverse string or -FIND to start at the comma (position 10) and pull back position 5? I need to do without VBA.
How many different variations of text are there? May not be possible if there isn't standardized text without using VBA.
ASKER
No standardized text. All different length and characters but typically only 1 comma per text string
You can avoid using vba by using a regex formula; however, if you are not familiar with regular expressions, you may find learning the formula harder than getting into vba.
From the "Developer" tab select the "Visual Basic" icon and then In the VBA window choose "Tools" from the menu. Then choose "References" and add "Microsoft VBScript Regular Expressions 5.5". Now you can start using regular expressions in your cells.
Note, regular expressions are extremely fast and can be used in almost any programming language. So it is worth learning.
From the "Developer" tab select the "Visual Basic" icon and then In the VBA window choose "Tools" from the menu. Then choose "References" and add "Microsoft VBScript Regular Expressions 5.5". Now you can start using regular expressions in your cells.
Note, regular expressions are extremely fast and can be used in almost any programming language. So it is worth learning.
ASKER
thank you on the regex suggestion. Little complcated for me. I will look to do with VBA.
Thanks
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
great job. Thanks