+ Reply to Thread
Results 1 to 4 of 4

Conditional Formatting - Apply Cell Style if a column cell is "string1" or "string2"

  1. #1
    Registered User
    Join Date
    08-29-2018
    Location
    United States
    MS-Off Ver
    Office 2013
    Posts
    2

    Question Conditional Formatting - Apply Cell Style if a column cell is "string1" or "string2"

    I'm trying to find how to get conditional formatting to apply a cell style if the cell contains either "string1" or "string2" (both are text values). I just can't seem to get a single conditional formatting rule to handle formatting for both text strings, and 2 single conditional formatting rules for one or the either term will end up formatting all the cells.

    Any help appreciated!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,694

    Re: Conditional Formatting - Apply Cell Style if a column cell is "string1" or "string2"

    Welcome to the Forum Tunnel_Snakes!

    There are two ways to do this. The way you tried using two rules should work, and should not format all cells. I cannot tell you why that didn't work without seeing your file and what you did.

    The other way is to use a single rule that uses "Use a formula to determine which cells to format" where the formula is

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


    where A1 is the upper-left cell of the range you want to format.

    If you are still having trouble it will help to attach your file with any private data removed. The paper clip icon does not work for attachments. Instead, under the text box where you type your reply click the Go Advanced button. On the next screen scroll down and click on Manage Attachments, which will show a pop-up window to Select and Upload a file. Then close the window.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    08-29-2018
    Location
    United States
    MS-Off Ver
    Office 2013
    Posts
    2

    Wink Re: Conditional Formatting - Apply Cell Style if a column cell is "string1" or "string2"

    This works as I needed it! (I also had another instance where I wanted to format any cells in a column where the values weren't one of those 2 strings, so I just wrapped the code from above in a
    Please Login or Register  to view this content.
    operator

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,694

    Re: Conditional Formatting - Apply Cell Style if a column cell is "string1" or "string2"

    Glad it helped! Thanks for the rep, and thanks for marking your thread Solved.

+ 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. Replies: 2
    Last Post: 07-13-2018, 11:52 PM
  2. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  3. Replies: 2
    Last Post: 09-12-2013, 10:56 PM
  4. [SOLVED] If there is any text in column "A$" on "sheet1" then move cell to column "A$" on "sheet2"
    By ckgeary in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-27-2013, 08:28 PM
  5. [SOLVED] Conditional formatting - formula if cell does NOT contain "," or "@"
    By Armitage2k in forum Excel General
    Replies: 12
    Last Post: 12-02-2012, 06:23 AM
  6. Replies: 2
    Last Post: 08-17-2012, 05:10 AM
  7. [SOLVED] implement test="=(SUM(R[-181]C:R[-170]C)-string1)/string2 "inVBA?
    By Monika in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-17-2006, 10:50 AM

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