Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 254
  • Last Modified:

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.
0
marku24
Asked:
marku24
1 Solution
 
Kyle AbrahamsSenior .Net DeveloperCommented:
How many different variations of text are there?  May not be possible if there isn't standardized text without using VBA.
0
 
marku24Author Commented:
No standardized text.  All different length and characters but typically only 1 comma per text string
0
 
David L. HansenProgrammer AnalystCommented:
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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

 
marku24Author Commented:
thank you on the regex suggestion.  Little complcated for me.  I will look to do with VBA.  
Thanks
0
 
Jeff DarlingDeveloper AnalystCommented:
Here is one way to do it.  although it takes a few columns to hold intermediate data....
EE2015022401.xlsx
0
 
marku24Author Commented:
great job.  Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now