Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Reverse Find in Excel

Posted on 2015-02-24
6
Medium Priority
?
201 Views
Last Modified: 2015-02-24
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.
0
Comment
Question by:marku24
6 Comments
 
LVL 41

Expert Comment

by:Kyle Abrahams
ID: 40628973
How many different variations of text are there?  May not be possible if there isn't standardized text without using VBA.
0
 

Author Comment

by:marku24
ID: 40628988
No standardized text.  All different length and characters but typically only 1 comma per text string
0
 
LVL 15

Expert Comment

by:David L. Hansen
ID: 40629010
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.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:marku24
ID: 40629033
thank you on the regex suggestion.  Little complcated for me.  I will look to do with VBA.  
Thanks
0
 
LVL 13

Accepted Solution

by:
Jeff Darling earned 2000 total points
ID: 40629122
Here is one way to do it.  although it takes a few columns to hold intermediate data....
EE2015022401.xlsx
0
 

Author Closing Comment

by:marku24
ID: 40629160
great job.  Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question