Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Excel Formula - certain part of string

Posted on 2016-10-12
2
Medium Priority
?
96 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Accepted Solution

by:
Shaun Kline earned 2000 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

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.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

719 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