+ Reply to Thread
Results 1 to 5 of 5

Conditional formatting based on Cell selection

  1. #1
    Registered User
    Join Date
    05-31-2023
    Location
    Alabama, US
    MS-Off Ver
    365
    Posts
    2

    Conditional formatting based on Cell selection

    Hello, I need assistance with a conditional formatting problem.

    I have a drop down list. In that list I have 2 selections, "A" and "B".

    If "A" is selected, I need values <10 to be red, and >= 10 to be green.
    If "B" is selected, I need values <5 to be red, and >= 5 to be green.

    I'm sure I'm just missing a step or ordering them wrong, but any help is greatly 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,721

    Re: Conditional formatting based on Cell selection

    Welcome to the Forum Scholtar87!

    I need values <10 to be red
    What values?

    Your description is not specific, that is, it doesn't identify what cells you are talking about. So I am going to give you an equally unspecific answer.

    Suppose that your dropdown list is in cell A1. Select the cells you want to apply formatting to. Suppose these cells are B1:F99. Create a new conditional formatting rule that uses a formula. You will need two rules, one for red and one for green.

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


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


    If this does not solve your problem then please see yellow banner at the top of the page and attach a sample file.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Conditional formatting based on Cell selection

    what cells are these in
    and AND() with an OR() would do it

    RED
    =OR(AND( cell with drop down = "A" ,cell with values <10) ,AND( cell with drop down = "B" ,cell with values <5) )
    format red
    =OR(AND( cell with drop down = "A" ,cell with values > = 10) ,AND( cell with drop down = "B" ,cell with values > = 5) )
    format green

    A sample sheet would help here, and possibly will enable a quicker and more accurate solution for you.


    The forum does allow for spreadsheets to be uploaded direct to the forum -

    Please see the Yellow Banner at the top of the page explaining how to attach a sample spreadsheet

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.

    Here are the instructions, found at the top of the page again
    Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands...) and some manually calculated results. For a new thread (1st post), scroll to Manage Attachments, otherwise scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    05-31-2023
    Location
    Alabama, US
    MS-Off Ver
    365
    Posts
    2

    Talking Re: Conditional formatting based on Cell selection

    This ABSOLUTELY solved my problem! I didn't even THINK to use an OR(AND) nest combo! Thank you, I was able to get everything I needed to work perfectly the first time (with some tweaking for my spreadsheet of course).

    Sorry I wasn't able to be more specific, but I needed to apply this formula across several spreadsheets with sometimes vastly different cell locations and values. For that reason I tried to keep my question as simple as possible.

    Thank again! Hope this helps others! If not I will gladly offer more specifics in order to assist.

  5. #5
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Conditional formatting based on Cell selection

    you are welcome

+ 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: 01-27-2016, 11:20 AM
  2. [SOLVED] Conditional formatting changes based on user selection
    By jrholden in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-17-2013, 05:07 PM
  3. Conditional formatting changes based on user selection
    By jrholden in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-17-2013, 01:09 PM
  4. [SOLVED] Conditional formatting based on selection and cell value
    By TrickY101 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-06-2013, 08:05 AM
  5. Conditional Formatting based on Combo Box Selection
    By CaddyMatt in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-23-2012, 09:07 AM
  6. conditional formatting based on menu selection
    By bcamp1973 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-10-2007, 06:52 PM
  7. Conditional Formatting based on another selection
    By crazy loud in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-27-2007, 09:27 PM

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