+ Reply to Thread
Results 1 to 5 of 5

Return "True" if a cell within a row of cells contains a certain text string

  1. #1
    Guest
    Join Date
    10-04-2013
    Location
    DC
    MS-Off Ver
    Excel 2003
    Posts
    3

    Return "True" if a cell within a row of cells contains a certain text string

    I have a spreadsheet in which each cell of data consists of titles of courses offered over several semesters; it includes course numbers, a semester (Spring, Summer, Fall), and a year (2010, 2011, 2012).

    Each row of data consists of a particular student's name.

    The columns themselves list the particular course each student has taken, beginning with the first. Thus, there is no particular meaning to each column, and the first column in each row merely lists the first in a chronological list of courses each particular student has taken.

    I would like to find a formula that would look within a row for whether any cell in that row contains the text, say, "Fall 2012". If the formula does find that text within any cell in that row, I would like to return "Y"; if not, I would like to return "N".

    Is there such a formula?

    Thanks for your help!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Return "True" if a cell within a row of cells contains a certain text string

    Hi and welcome to the forum

    If that is the only data in a cell, you could use something like...=countif(range,"Fall 2012")>0
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Guest
    Join Date
    10-04-2013
    Location
    DC
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Return "True" if a cell within a row of cells contains a certain text string

    Quote Originally Posted by FDibbins View Post
    Hi and welcome to the forum

    If that is the only data in a cell, you could use something like...=countif(range,"Fall 2012")>0
    Thanks for the reply!

    Sadly, no. Each cell is complicated by the existence of course numbers, and course numbers of unequal length at that. (I had thought of doing a column split, or a LEFT/RIGHT function, but the number of characters from cell to cell is uneven.)

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Return "True" if a cell within a row of cells contains a certain text string

    Post SEVERAL representative examples so we can see what the strings look like.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Guest
    Join Date
    10-04-2013
    Location
    DC
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Return "True" if a cell within a row of cells contains a certain text string

    Quote Originally Posted by FDibbins View Post
    Hi and welcome to the forum

    If that is the only data in a cell, you could use something like...=countif(range,"Fall 2012")>0
    On a second try, I used the asterisk key as a wildcard. That seemed to work, using the function above.

    Thanks for your 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. [SOLVED] Search numbers in a text string, find largest "value" return a value
    By OilGasKing in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-27-2013, 09:01 PM
  2. Replies: 4
    Last Post: 09-06-2012, 02:37 AM
  3. VLookup to return "true" or "false"
    By Sph01 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-29-2011, 11:10 AM
  4. Replies: 1
    Last Post: 10-10-2006, 12:51 AM
  5. If "text" exist within "cell" then TRUE
    By JemyM in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 09-16-2005, 07:41 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