+ Reply to Thread
Results 1 to 4 of 4

Code to pull out all the text in a cell before the word 'to'

  1. #1
    Registered User
    Join Date
    05-02-2018
    Location
    london
    MS-Off Ver
    2013
    Posts
    6

    Code to pull out all the text in a cell before the word 'to'

    Hi all,

    Hoping you can help with some advice.

    I basically have a long list of titles of letters with the sender and receiver. I would like to be able to instantly pull all the names in the list of cells that appear before the letter 'to' so I can then look at the frequency with which these names appear.

    I'm hoping this may be a simple piece of code?

    Thank you very much in advance from a beginner!
    Last edited by danc1994; 01-10-2020 at 06:27 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2010 on Linux - O365
    Posts
    12,685

    Re: Code to pull out all the text in a cell before the word 'to'

    Please post a sheet with some examples to see the formatting ( see yellow banner)
    The string "to" might appear different times in the titles

  3. #3
    Registered User
    Join Date
    05-02-2018
    Location
    london
    MS-Off Ver
    2013
    Posts
    6

    Re: Code to pull out all the text in a cell before the word 'to'

    Apologies - example now attached

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2010 on Linux - O365
    Posts
    12,685

    Re: Code to pull out all the text in a cell before the word 'to'

    One way Slect the column
    Ctrl+H
    Find whet :" to*" ( no double quotes but a space before the " to")
    Replace with: leave blank
    Click Replace All
    Done

+ 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. Save text as word document and pull that through google translate
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-06-2016, 03:05 AM
  2. vba code to pull some info from address if a word is present in description.
    By kire14 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-29-2016, 12:31 PM
  3. Forumula That Will Pull A Spefic Word From A Cell
    By FionnMcCool in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-07-2016, 11:37 AM
  4. Formula to pull #word from a long text string
    By BJhawks20 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-02-2014, 08:46 AM
  5. Code/Solution To Search All Text in a Cell and Pull UniqueID Corresponding to the Text
    By brandnew22 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-06-2013, 10:56 AM
  6. [SOLVED] Formula to pull first word out of string of text
    By kenadams378 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-24-2013, 05:24 AM
  7. Replies: 0
    Last Post: 07-02-2013, 08:40 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