+ Reply to Thread
Results 1 to 4 of 4

How to locate specific text within a cell, starting from the right

  1. #1
    Registered User
    Join Date
    07-30-2014
    Location
    SimplySA
    MS-Off Ver
    2010
    Posts
    2

    Question How to locate specific text within a cell, starting from the right

    Hi All,

    I am but a mere newbie still and although I have worked through various training vids and understand a fair amount of most of the VBA code I see, I have a problem which I just cannot solve and hope someone here can be so kind as to help me out. I've been scouring the net and forums to find a solution, but most are close to what I am after, but fail when I try to adapt the code for my specific issue.

    My issue is I am looking for either a formula or macro to look at a cell containing text, starting from the right hand side of a cell, identify a specific delimiter, lets say ---- as an example and only remove data to the left of the example once it finds the second instance of the example. Below is a typical text box for me and the way it would be generated. It always end with ----, some text, then again ----, more text and so on, with each instance of text being enclosed between these ---.

    In sincerely hope someone can help me.

    Text Box Example: (The length of text within each cell may change, but it will always have ---- between text fields and end with ---)
    05/29/2014 09:05AM
    Peter Williams (BG56586)

    Not Home That Day
    ----
    05/29/2014 09:08AM
    Peter Williams (BG56586)

    On the phone
    ----
    05/29/2014 09:10AM
    Peter Williams (BG56586)
    Left early
    ----


    The Desired Result should leave me with just;
    ----
    05/29/2014 09:10AM
    Peter Williams (BG56586)
    Left early
    ----
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: How to locate specific text within a cell, starting from the right

    Hi

    a simple user defined function is all you need:




    Please Login or Register  to view this content.
    Last edited by mehmetcik; 08-01-2014 at 09:18 PM.

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: How to locate specific text within a cell, starting from the right

    Hi

    a simple user defined function is all you need:


    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-30-2014
    Location
    SimplySA
    MS-Off Ver
    2010
    Posts
    2

    Smile Re: How to locate specific text within a cell, starting from the right

    Dear mehmetcik,

    Wow, I have to be honest and never knew you could add an additional function to excel. I will be looking at this in more detail. It worked brilliantly. I cannot thank you enough.

    Thank you for the amazing help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. remove all text starting from specific character in a cell
    By itselflearn in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-24-2015, 12:17 PM
  2. Parsing text from string starting with specific symbol
    By dcorner in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-08-2013, 10:32 AM
  3. [SOLVED] Macro: Locate specific text within supplied range
    By darrenkaye in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-17-2012, 01:03 PM
  4. Locate a reference in a table based on specific words on a text
    By zetavares83 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-06-2012, 06:17 PM
  5. Locate row above cell with specific text, and apply formatting?
    By HelenW in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-08-2009, 11:09 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1