+ Reply to Thread
Results 1 to 6 of 6

Find text in cells - first word only

  1. #1
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    548

    Find text in cells - first word only

    Is there a way to look for text in cells using the Find function.
    The additional criteria is that it has to be the first word only.
    In the example shown, the first word to find is "This". The result should be Rows 1 to 2, instead of Rows 1 to 7.

    I would think it could de done using an array but want to avoid if looping through large amounts of data.

    Capture2.PNG

    Please Login or Register  to view this content.
    Last edited by Un-Do Re-Do; 09-30-2020 at 03:40 AM.

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Find text in cells - first word only

    It cannot be done through the interface because the find feature Excel offers only has a drop-down menu that offers to find the string you're searching for as the entire cells string or any word in any given cell you can't specify an option to find the first delimited string which in your case would be the first English word of the cell. more than likely you can do it with code and there are various ways you can do that you mentioned an array that's one way you can do it. If someone else who is a forum expert is looking at this thread, more than likely they will come back with an answer of how to Target an entire matrix type of range instead of looping through every cell singly in a range to try and manipulate the data like you want. I know for a fact you can find any given cell from a starting point and then you can find next any given cell from any other starting point which doesn't have to be the beginning point because I just finished the job that had code written from an old developer that was that was using those methods.

    By the way, I find your username on this forum quite funny LOL

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Find text in cells - first word only

    Try change to
    Please Login or Register  to view this content.

  4. #4
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Find text in cells - first word only

    Hey jindon,

    If that's wild card symbol the asterisk actually has a purpose in Excel that's pretty cool I had no idea the interface could make good use of that symbol. I will put that in my knowledge base

  5. #5
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    548

    Re: Find text in cells - first word only

    Thanks jindon, that actually does work. It saves me from using more code.
    @vba_php, thanks for comments.

  6. #6
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Find text in cells - first word only

    It seems in this instance I showed my typical behavior whereas I wrote an entire book and two lines of code is the solution LOL how sad :-(

+ 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. [SOLVED] Find text in word in the cell and replace whole word
    By Grens in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-31-2016, 01:44 PM
  2. [SOLVED] Find word in text string and return word adjacent to the left
    By eadamquinn in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-06-2014, 03:22 PM
  3. Replies: 5
    Last Post: 01-03-2014, 09:18 PM
  4. find a text in a word
    By kishoremcp in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-30-2013, 01:43 PM
  5. Replies: 3
    Last Post: 12-18-2012, 07:19 PM
  6. [SOLVED] Find cells which contain specific word, delete cells and shift left.
    By BPSJACK in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-24-2012, 07:00 AM
  7. find in excel replace in word: find/replace text in text boxes and headers
    By dean.rogers in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2012, 12:40 PM

Tags for this Thread

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