Solved

Excel Formula - certain part of string

Posted on 2016-10-12
2
56 Views
Last Modified: 2016-10-12
I am trying to use a formula, that looks at a string and search for a certain word, but I want to only search after the last "-"

for example

This would return a true statement - test-test123-test-test123  as test123 is the last part of text

This would return a false statement - test-test-test123-test456 as test456 is the last part of the text

Any suggestions on how i can accomplish this ?
0
Comment
Question by:dkilby
2 Comments
 
LVL 26

Accepted Solution

by:
Shaun Kline earned 500 total points
ID: 41840717
Something like this:

=NOT(ISERROR(FIND(B2, A2, FIND("~", SUBSTITUTE(A2, "-", "~", LEN(A2)-LEN(SUBSTITUTE(A2, "-", "")))))))

Open in new window


where your search term is in B2 and your string to be searched is in A2.
0
 

Author Closing Comment

by:dkilby
ID: 41840810
thank you
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

679 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