Solved

Reverse Find in Excel

Posted on 2015-02-24
6
98 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

790 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