+ Reply to Thread
Results 1 to 10 of 10

Conditional Formatting with Too Many Conditions

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    11-20-2008
    Location
    UK
    MS-Off Ver
    Office 365 For Mac Excel Version 16.88
    Posts
    143

    Conditional Formatting with Too Many Conditions

    I have a column (F) in which the rows could contain anything. I want to use conditional formatting to highlight the cells that DON'T contain certain specific text or that are blank. The problem is that their are around 40 specific texts I don't want it to highlight. The text I don't want to highlight are:

    Part1, Part2 etc....Part10
    Part 1, Part 2 etc.....Part 10
    Disc1, Disc2 etc.....Disc10
    Disc 1, Disc 2 etc....Disc 10

    I've been using the formula =AND($F4<>"PART1",AND($F4<>"PART2",AND($F4<>"PART3",AND($F4<>"PART4",AND($F4<>"PART5",AND($F4<>"PART6",AND($F4<>"PART7",AND($F4<>"PART8",AND($F4<>"PART9",AND($F4<>"PART10",NOT(ISBLANK($F4))))))))))))

    This works okay but not if there is a space between Part and the number and not at all for Disc but it won't let me add any further conditions (I'm using the Mac version of Excel if that makes a difference)

    The obvious solution would be to use a wild card Part* and Disc* but when I try that it highlights everything except blanks. I'm assuming when using <> not equal it then takes the text literally i.e. it's looking to see Part* or Disc*

    Is there a way around this?
    Attached Files Attached Files
    Last edited by peakoverload; 08-14-2024 at 08:30 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,132

    Re: Conditional Formatting with Too Many Conditions

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.

    Also, please go back to your previous thread and address the issues in this post: https://www.excelforum.com/excel-gen...ml#post5974195

    Thank you.

    I'm using the Mac version of Excel if that makes a difference)
    It might - this is why we need to know details of your Excel version and have asked you to put them into your forum profile.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,132

    Re: Conditional Formatting with Too Many Conditions

    Thanks for updating your profile. Is 16.88 a 365 edition? If so, please also add that to your profile.

    Then please provide a sample workbook that includes a full list of all the texts that you would not want highlighting. Make sure that it has a good amount of sample data for us to use for testing.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,132

    Re: Conditional Formatting with Too Many Conditions

    CF rule for A4:

    =AND(A4<>"",LEFT(A4,4)<>"PART",LEFT(A4,4)<>"Disc")

    Applies to: =$A$4:$A$27

  5. #5
    Forum Contributor
    Join Date
    11-20-2008
    Location
    UK
    MS-Off Ver
    Office 365 For Mac Excel Version 16.88
    Posts
    143

    Re: Conditional Formatting with Too Many Conditions

    Okay, that is a LOT simpler than what I was trying! I don't use Excel very often and hadn't come across Left before. Just looked it up and can already see how this would make some of my other formulas much easier and more accurate. Everyday is a school day

    Thank you for this, much appreciated!

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,132

    Re: Conditional Formatting with Too Many Conditions

    I have come up with a tweak just in case you have other words starting with 'part' or 'disc':

    =AND(A4<>"",LEFT(A4,4)<>"PART",LEFT(A4,4)<>"Disc",NOT(ISNUMBER(--TRIM(MID(A4,5,2)))))

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) 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 each of those who offered help.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,132

    Re: Conditional Formatting with Too Many Conditions

    Actually, that's not working! LOL! I shall tweak it again.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,132

    Re: Conditional Formatting with Too Many Conditions

    This works:

    =AND(A4<>"",OR(LEFT(A4,4)<>"PART",LEFT(A4,4)<>"Disc"),NOT(ISNUMBER(--TRIM(MID(A4,5,2)))))

  9. #9
    Forum Contributor
    Join Date
    11-20-2008
    Location
    UK
    MS-Off Ver
    Office 365 For Mac Excel Version 16.88
    Posts
    143

    Re: Conditional Formatting with Too Many Conditions

    That's perfect. Thank you again. There is the possibility that some folders might start with those letters so I will use this formula just in case.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,132

    Re: Conditional Formatting with Too Many Conditions

    There's foresight for you!!!

    Happy to help - thanks for the rep.

+ 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] How to use conditional formatting with the help IF conditions
    By Pawnar in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-30-2019, 05:55 PM
  2. Delete Conditional Formatting conditions but keep cell formatting
    By Devendra.dvm in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-03-2016, 04:07 AM
  3. Delete Conditional Formatting conditions but keep cell formatting - Excel 2010
    By tetreama in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-09-2012, 08:28 PM
  4. How to add more conditional formatting conditions than 3?
    By Smirgelius in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 03-22-2009, 03:59 AM
  5. Re: More than 3 Conditional Formatting Conditions
    By Adam in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-06-2006, 03:40 PM
  6. [SOLVED] Conditional formatting wth more than 3 conditions
    By Sue in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  7. Replies: 2
    Last Post: 05-11-2005, 04:06 AM

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