+ Reply to Thread
Results 1 to 5 of 5

Highlighting Cells with Conditional Formating Formulas

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    02-11-2009
    Location
    Montclair, NJ
    MS-Off Ver
    Excel 365
    Posts
    236

    Highlighting Cells with Conditional Formating Formulas

    Hey,

    I'm looking to highlight cells using conditional formatting formulas

    I have 3 items (1, 2 & 3) and each item has a range (100-200, 250-350, 400-500) respectively

    When typing in cell A1 either "1", "2" or "3" and then any value in A2, if the value is outside the given ranges, I'd like A2 to be highlighted in Red

    Is there a formula that I could use to make this work?

    I tried using IF AND statements, but I'm just learning conditional formatting so I wasn't able to get it to work

    Thank you and I appreciate your time
    Bob
    Last edited by sighlent1; 04-07-2010 at 10:23 AM. Reason: Solved

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Highlighting Cells with Conditional Formating Formulas

    Try this Conditional Formula on A2:

    =AND(A1<>"",A2<>"",OR(AND(A1=1,OR(A2<100,A2>200)),AND(A1=2,OR(A2<250,A2>350)),AND(A1=3,OR(A2<400,A2>500))))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    02-11-2009
    Location
    Montclair, NJ
    MS-Off Ver
    Excel 365
    Posts
    236

    Re: Highlighting Cells with Conditional Formating Formulas

    That's EXACTLY what I was looking for

    Thank you SOOOO much, I really appreciate it!!!!!
    Bob

  4. #4
    Forum Contributor
    Join Date
    02-11-2009
    Location
    Montclair, NJ
    MS-Off Ver
    Excel 365
    Posts
    236

    Re: Highlighting Cells with Conditional Formating Formulas

    Just curious, what does this part of the code mean?:

    A1<>"",A2<>""

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Highlighting Cells with Conditional Formating Formulas

    Just ensuring that A1 and A2 are not blank first....

    If you enter a value in A1 and A2 is blank, it colours the cell Red if those aren't there...

    I suppose you don't really need the A1<>"" part... but doesn't hurt to have the extra measure of safety.

+ 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