+ Reply to Thread
Results 1 to 18 of 18

Conditional formatting using multiple different text

  1. #1
    Registered User
    Join Date
    08-21-2013
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    7

    Conditional formatting using multiple different text

    I use MS Excel 2007 and I am having trouble creating a database. I need to have certain cells formatted to turn certain colors depending on what name is in them.

    E.g If cells A1:AJ18 = "Bob Smith" that cell needs to turn red. If cells A1:AJ18 = "Chad Smith" that cell need to be blue, etc.

    I have tried different conditional formatting/rule making scenarios and nothing seems to be working.

    Any help would be greatly appreciated!

  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,938

    Re: Conditional formatting using multiple different text

    Hi and welcome to the forum

    1st, this looks to be an excel question, not an outlook question, so I will move it to that forum.

    2nd, what you want to do is relatively easy using Conditional Formatting...
    1. highlight the range you want to apply the conditional formatting to
    2. on the home tab, styles, select CF
    3. select new rule, select use formula
    4. enter =A1="Bob Smith" format fill Red

    Repeat 3 and 4 for other names
    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
    Registered User
    Join Date
    08-21-2013
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Conditional formatting using multiple different text

    Thanks for the info!

    unfortunately, this did not work. I think I have some other things going on in my chart that may be preventing this from working.

    I have a lot of cells merged together, creating a bigger space for my names to appear in. So the names I need highlighted, aren't in one cell but essentially in two cells. I am not sure if it's possible to do what I want to do with this being the case.

    Also, it's a situation where I need to enter a name, and then the cell turns either red, blue, green etc. based on if that persons name matches a list of about 25-75 names. So if the name I enter is Bob Smith, the cell might turn red. If the name I enter is Joe Smith, the cell might turn green. So would I need to enter in every single possibility into the CF formula bar or can I list them in a different part of the workbook and just enter in the cell range that that encompasses the names?

  4. #4
    Registered User
    Join Date
    02-18-2013
    Location
    Georgia
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Conditional formatting using multiple different text

    you can make as many cf rules as you want, or you could have cf rules for various ranges. both ways will work. if you post a sample .xls, we can take a look for you.

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Conditional formatting using multiple different text

    It's important to understand about Merged Ranges...

    Only the top/left cell of a merged range actually contains a value.

    So if your merged range is say A1:A2, only A1 actually contains a value.
    A2 remains empty.

    And A1 is the only 1 that you need to test in conditional formatting.
    You can still test A2, but it will be false, which is fine.
    The merged range will still highlight so long as it was True for A1.
    Last edited by Jonmo1; 08-21-2013 at 01:10 PM.

  6. #6
    Registered User
    Join Date
    08-21-2013
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Conditional formatting using multiple different text

    Ok thanks!

    I think I need to look at how many cells I am merging and see if I can make it more simplistic.

    Is it possible to simply create a rule for cells that contain specific text, and enter in more than one name as the specific text? E.g. In the specific text window I can enter "Bob Smith", "J. Smith", etc?

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Conditional formatting using multiple different text

    Yes...
    However, you're doing a different color for each name.
    So you need a seperate conditional format formula for each different color you're using.

  8. #8
    Registered User
    Join Date
    08-21-2013
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Conditional formatting using multiple different text

    Thanks!

    Is there a specific way I need to write the multiple names in the window? I have tried a few different ways and it doesn't appear to be working. Only cells that contain - specific text - containing - "B. Smith", "J. Smith" etc. This didn't seem to work. I have a big selection of cells highlighed for this rule, C3:AE36 with merged cells as well. Not sure if thats the issue.

  9. #9
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Conditional formatting using multiple different text

    You're not really listening...

    You have to create 1 rule for each individual name..
    Because you're changing the cells to a different color for each name.

    If you were changing ALL specified names to the same color, then yes it would be doable in one formula.
    But since you want
    "Bob Smith" red and "Chad Smith" blue, etc...
    Then you can't do it in a single formula.

    1 Conditional format formula for Bob Smith
    and another for Chad Smith

  10. #10
    Registered User
    Join Date
    08-21-2013
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Conditional formatting using multiple different text

    Yes, but I want multiple names to be blue. B. Smith, C. Smith, D. Smith all to be blue. And then T. Doe, B. Doe to be red. So I need multiple formulas per color, I get that.

    What I am saying is that, I must not be writing the formula correctly because it's not working. Also, I am not sure if my multiple merged cells are the problem.

  11. #11
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Conditional formatting using multiple different text

    Oh, Ok..

    Setup some lists on your sheet to hold the names..
    Say for example Z2:Z4 = B.Smith C. Smith and D.Smith

    Then in conditional formatting, choose "Use a formula to determine...."
    And use
    =MATCH(A1,$Z$2:$Z$4,0)
    Adjust A1 to the currently active cell at the time you go into conditional formatting.

  12. #12
    Registered User
    Join Date
    08-21-2013
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Conditional formatting using multiple different text

    OK thanks.

    Just to make sure I am understanding this correct, A1 would be the cell I want to be highlights right? Based on which name is in it, with reference to the cells Z2:Z4.

    What if I needed the highlighted cell to be in a range? For instance, in my chart....which is say A1:AE36, I have a name in each cell, or will type a name in each cell. I need to create a rule, for that entire range that if the name is one of the names in Z2:Z4, that cell in my A1:AE36 range turns red. Is this possible?

  13. #13
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Conditional formatting using multiple different text

    Yes, if your whole range is A1:AE36..

    Put the list somewhere OUTSIDE that range..say A100:A102

    Then highlight your whole range A1:AE36
    Go to conditional formatting and use formula
    =MATCH(A1,$A$100:$A$102,0)

  14. #14
    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,938

    Re: Conditional formatting using multiple different text

    Im not sure if this came across strongly enough, but merging cells should be avoided it at ALL possible, they cause nothing but problems with formulas, and there are other ways of making the data cosmetically apealing

  15. #15
    Registered User
    Join Date
    08-21-2013
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Conditional formatting using multiple different text

    Yah, unfortunately the merged cells are a necessity.

    Thanks for all your help,I think I have it now!

    Thanks!!

  16. #16
    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,938

    Re: Conditional formatting using multiple different text

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  17. #17
    Registered User
    Join Date
    03-12-2019
    Location
    lima
    MS-Off Ver
    2016
    Posts
    1

    Exclamation Re: Conditional formatting using multiple different text

    hELLO

    I'm trying conditional formatting two text type of text: "Low" in Yellow and "very Low" in Green. Unfortunately, Excel is picking both either yellow or green. Everything!

  18. #18
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Conditional formatting using multiple different text

    Formula for cf of A2

    For yellow
    =A2="low"

    For Green
    =A2="very low"

    then copy Formats to other cells
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

+ 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: 5
    Last Post: 06-12-2014, 09:23 AM
  2. Conditional formatting with multiple text values
    By woodruff in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-26-2013, 10:23 AM
  3. Replies: 2
    Last Post: 07-25-2012, 11:42 PM
  4. [SOLVED] Conditional Formatting Multiple Text Values
    By Graham Taylor in forum Excel General
    Replies: 3
    Last Post: 06-04-2012, 04:39 PM
  5. Replies: 3
    Last Post: 10-09-2009, 01:34 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