+ Reply to Thread
Results 1 to 5 of 5

If a Cell Does Not Contain "text" Return a Value

  1. #1
    Forum Contributor
    Join Date
    05-29-2009
    Location
    Chattanooga, TN
    MS-Off Ver
    2021
    Posts
    205

    If a Cell Does Not Contain "text" Return a Value

    How do I write a formula for if cell a1 does not contain "abc" then return the value "Happy 4th of July" otherwise ""?

    eg: "dkdkdkdk" should give me the value Happy 4th of July.
    "I like to sing my abcs" should return a blank cell.

    Thanks!
    Last edited by Ocean Zhang; 07-01-2011 at 06:03 PM.

  2. #2
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: If a Cell Does Not Contain "text" Return a Value

    Hello,

    Assume the text is in A1, in B1 enter,

    =IF(ISERROR(SEARCH("abc",A1)),"Happy 4th of July","")

    Or,

    =IF(COUNTIF(A1,"*abc*"),"","Happy 4th of July")
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  3. #3
    Forum Contributor
    Join Date
    05-29-2009
    Location
    Chattanooga, TN
    MS-Off Ver
    2021
    Posts
    205

    Re: If a Cell Does Not Contain "text" Return a Value

    that worked great. thanks!

  4. #4
    Registered User
    Join Date
    06-26-2019
    Location
    Namibia
    MS-Off Ver
    2016
    Posts
    12

    Re: If a Cell Does Not Contain "text" Return a Value

    hi

    please help me

    =COUNTIF(J6:J24,"Disqualified")

    countif that range has the text disqualified. if not make 0 in formula

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: If a Cell Does Not Contain "text" Return a Value

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original. Please start a new thread - See Forum rule #4

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Dave

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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