Solved

Reverse Find in Excel

Posted on 2015-02-24
6
70 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 39

Expert Comment

by:Kyle Abrahams
Comment Utility
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
Comment Utility
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
Comment Utility
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:marku24
Comment Utility
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
Comment Utility
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
Comment Utility
great job.  Thanks
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

771 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

10 Experts available now in Live!

Get 1:1 Help Now