+ Reply to Thread
Results 1 to 4 of 4

What to skip if contains certain text strings

  1. #1
    Forum Contributor
    Join Date
    04-05-2010
    Location
    Lakewood, IL
    MS-Off Ver
    Excel 2016
    Posts
    405

    What to skip if contains certain text strings

    I have a simple issue with searching through a cell's text to see if it has one of the following words: Total, Income, Made or Earned. The following function in my VBA code should if it finds any of these strings skip over the "Then". I uses "UCase" to make it case insensitive plus put a space and the beginning and end of the cell. I want to find the whole word.

    the cells contain:

    Total Expense
    Net Ordinary Income
    7010 · Interest Income
    Total Other Income
    Net Other Income

    Please Login or Register  to view this content.
    Am I missing something here?

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: What to skip if contains certain text strings

    Does this help?

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    04-05-2010
    Location
    Lakewood, IL
    MS-Off Ver
    Excel 2016
    Posts
    405

    Re: What to skip if contains certain text strings

    Quote Originally Posted by JOHN H. DAVIS View Post
    Does this help?

    Please Login or Register  to view this content.
    I believe this will work, but it has to be case insensitive and the word (string) has to stand as a separate word.
    But do you see any reason my code does not work?

  4. #4
    Forum Contributor
    Join Date
    04-05-2010
    Location
    Lakewood, IL
    MS-Off Ver
    Excel 2016
    Posts
    405

    Re: What to skip if contains certain text strings

    Quote Originally Posted by Bobbbo View Post
    I believe this will work, but it has to be case insensitive and the word (string) has to stand as a separate word.
    But do you see any reason my code does not work?
    it turns out my logic was inverted. I needed to find that string then skip over the "DO SOMETHING"

    Please Login or Register  to view this content.
    Thanks again for the 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. Formula to find and return text string within a cell full of text strings
    By LightingPop in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-03-2013, 11:45 PM
  2. Replies: 2
    Last Post: 03-07-2013, 02:34 AM
  3. Replies: 6
    Last Post: 02-28-2013, 11:27 AM
  4. Help searching an array of text strings for common strings
    By ABComp in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-23-2012, 11:19 PM
  5. Help with finding text strings in other text strings.
    By GBrennan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-21-2012, 11:38 AM
  6. Replies: 3
    Last Post: 05-25-2012, 05:45 PM
  7. Replies: 6
    Last Post: 03-08-2012, 10:35 AM
  8. How to skip cells with text strings.
    By mikeburg in forum Excel General
    Replies: 1
    Last Post: 08-05-2005, 08:05 PM

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