+ Reply to Thread
Results 1 to 6 of 6

Conditional Formatting based on multiple strings in multiple cells

  1. #1
    Registered User
    Join Date
    01-26-2013
    Location
    Del Rio,TX
    MS-Off Ver
    Excel 2007
    Posts
    4

    Question Conditional Formatting based on multiple strings in multiple cells

    Hi,

    I'm trying to find a formula that would change the color of one cell based on multiple words found in a row. For example A1 would turn red if any cell from A2:H2 contains any of the following anywhere in the cell "BKN001,"1/4","TS","35" etc... Your help is appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Conditional Formatting based on multiple strings in multiple cells

    try one of these as the new rule, formula,

    For distinct words, (separated from other text in the cell...):
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If just if they exist at all in the cell:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The $A$5:$A$8 refers to a list I made to hold the comparison strings, see attached

    Hope this helps
    Attached Files Attached Files
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  3. #3
    Registered User
    Join Date
    01-26-2013
    Location
    Del Rio,TX
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Conditional Formatting based on multiple strings in multiple cells

    Thanks for the quick response. I'm having some trouble understanding which part of the formula is telling the cell to turn red based on the the specific criteria I have. I tried changing the cells info and it still remained red I think it's because its not looking for the criteria set specifically: "BKN001", "TS","35"...etc. I also need to be able to add other criteria to the formula. Thanks for your help.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    49,972

    Re: Conditional Formatting based on multiple strings in multiple cells

    Hi lily, your sample file is not very clear and really only contains 1 line of data. Could you upload another file, with a few more samples of data, and some examples of what your expected outcome would be? and if its not really clear, how you arrived at your answer, please explain that too
    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

  5. #5
    Registered User
    Join Date
    01-26-2013
    Location
    Del Rio,TX
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Conditional Formatting based on multiple strings in multiple cells

    Thanks for your help. I attached a file with a few more lines of data and comments in the cells hoping it would help clear up what I'm looking for. The first column of cells is basically looking for "BKN001", any part of the word "TS","35","OVC001", "VV001"," and any value below "1/2".
    Attached Files Attached Files

  6. #6
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Conditional Formatting based on multiple strings in multiple cells

    the formula works fine:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The red parts above are the range where the comparison data is, to add more conditions, add to the bottom of list(yellow fill in attachment) and adjust the range numbers accordingly

    if the case of the text doesn't matter, change FIND to SEARCH

    Hope this helps
    Attached Files Attached Files

+ 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