Solved

Reverse Find in Excel

Posted on 2015-02-24
6
74 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 40

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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 12

Accepted Solution

by:
Jeff Darling earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

911 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now