+ Reply to Thread
Results 1 to 5 of 5

Conditional Formating - show "1" for Blank and any keywords which doesn't show in text

  1. #1
    Forum Contributor
    Join Date
    05-22-2015
    Location
    Malaysia
    MS-Off Ver
    MS365
    Posts
    197

    Conditional Formating - show "1" for Blank and any keywords which doesn't show in text

    Hi

    I am trying to set a conditional format for the cell is blank or no keywords appeared in the text. I tried different formulas but it didnt work such as IF(S3="",1,IF(COUNT(SEARCH(keywords,S3),0,1),0)).
    When I key in the text, for example "No SLA on Friday" or any text which doesn't have the below keywords should show as "1" but it is showing as "0".


    My keywords are as follows:
    1) No batch
    2) No EOD
    3) delay
    4) activity
    5) NA
    6) DeCom

    Please advise. Really appreciate your assistance.

    Regards

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Conditional Formating - show "1" for Blank and any keywords which doesn't show in tex

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Use this one. You are using extra argument that is last these "0))". remove them and it will may be work.
    Last edited by shukla.ankur281190; 09-09-2015 at 08:32 AM.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Conditional Formating - show "1" for Blank and any keywords which doesn't show in tex

    hi suchetherrah. your formula will always return 0 because of this portion:
    IF(COUNT(SEARCH(keywords,S3),0,1),0)

    this means to count how many numbers appear in:
    COUNT(SEARCH(keywords,S3),0,1)

    and the above actually counts 0 and 1 as 2 numbers in total. so you then say if there is a number (which there is always going to be since you include 0 and 1 as part of the COUNT formula), return 0.

    you can try this instead:
    =--(ISERROR(LOOKUP(2^15,SEARCH(keywords,S3))))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,062

    Re: Conditional Formating - show "1" for Blank and any keywords which doesn't show in tex

    That's not conditional formatting. Conditional Formatting FORMATS the cell, it doesn't change the VALUE in a cell.
    That's just a simple condition, don't confuse the two.

    Try
    =IF(S3="",1,IF(COUNTIF(keywords,S3),0,1))
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  5. #5
    Forum Contributor
    Join Date
    05-22-2015
    Location
    Malaysia
    MS-Off Ver
    MS365
    Posts
    197

    Re: Conditional Formating - show "1" for Blank and any keywords which doesn't show in tex

    It worked. Thank you all for your contribution.

+ 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] Keeping particular cell blank if the related cells show "0" or "blank"
    By Anuru in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-24-2014, 05:30 AM
  2. [SOLVED] Macro doesn't record formating "general" text into number
    By Dorocica in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-11-2014, 11:13 AM
  3. Replies: 3
    Last Post: 01-02-2014, 02:15 PM
  4. Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)" not working
    By redders in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2011, 03:52 PM
  5. "Show Field List" in Pivot Table Toolbar doesn't work
    By Flyer27 in forum Excel General
    Replies: 0
    Last Post: 04-11-2006, 07:10 PM
  6. [SOLVED] conditional formula to show "open" or "closed"
    By SBS in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-27-2006, 09:50 PM
  7. [SOLVED] Formatting to show/not show "DUE" and "RECEIVED" in cell
    By kevhatch in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 10-09-2005, 05: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