+ Reply to Thread
Results 1 to 9 of 9

Conditional Formatting based on a Formula

  1. #1
    Registered User
    Join Date
    12-01-2012
    Location
    British Columbia, Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Conditional Formatting based on a Formula

    Hi Everyone.

    I am new here and have been trying to get some conditional formatting working on an entire row based on a formula. I have attached a copy of the file.

    The goal is to have the entire row highlight in color 1 if the Original Date >= 7 days compared to the Current Date AND the item is not part of the Back ordered/ discontinued. not available from a list called backorder on sheet 2. If the item is indicated as back ordered then I want to have it colored in color 2. I understand that these two conditionals would need to be on two seperate conditions.

    The formula I have been trying is =IF(AND(N3>=7,C3<>Backorder), 1, 0). While some of the coloring is showing it only is highlighting 2 or 3 cells of the row and wont self update.


    Special Order File - Generic.xlsx

    Thanks a Ton.

  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 a Formula

    Highlight the range of cells you want the conditional formatting to apply to (A3:M30)
    Conditional formatting>New Rule>Use formula

    =And(($O$3-A3)>=7,C3<>"Backorder")

    Format>Fill--choose highlight color...OK,OK

    Hope this helps


    Edit
    made the 03 reference Absolute
    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
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Conditional Formatting based on a Formula

    Perhaps in CF use

    =AND($A3<=TODAY()-7,OR($C3<>"Discontinued",$C3<>"Backorder"))

    format red
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    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 a Formula

    oh sorry, missed the discontinued requirement,

    =And(($O$3-A3)>=7,C3<>"Backorder",c3<>"Discontiinued")

  5. #5
    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 a Formula

    Reread OP, I think this is more What you are looking for in the first Rule

    =And(($O$3-A3)>=7,ISError(Match(C3,Backorder,0)))

    For the second

    =And(($O$3-A3)>=7,C3="Backorder")

    (assuming that you only want the "Backorder" item of the list to be highlighted)

    or

    =And(($O$3-A3)>=7,ISError(Match(C3,Backorder,0))=false)

    if you want all the items in the list to get highlighted differently

  6. #6
    Registered User
    Join Date
    12-01-2012
    Location
    British Columbia, Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Conditional Formatting based on a Formula

    Hi Dred,

    It looks like your last reply is definitely on the right track. It colors some of the row when the back order Column has no text in it (back order, discontinued, not available. Currently, column's A C G H are the only ones that are coloring.

    With regards the back order formatting, I want the entire row to be in the color when it shows as back ordered, not available, or discontinued.
    I have tried both of the Back Order rules. Rule #1 doesn't do anything when there is text in 'C' and rule 2 only colors the Original Date (Column A).

    Both Rules are applying to the $A$3:$M$3. I will be copying the rules down each row.

    I've reattached a new file.

    Special Order File - Generic.xlsx

    Thanks

  7. #7
    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 a Formula

    OK, think I got it figured :
    Rule 1
    =And($A3<>"",($O$3-$A3)>=7,ISError(Match($C3,Backorder,0)))
    Rule 2
    =And($A3<>"",($O$3-$A3)>=7,ISError(Match($C3,Backorder,0))=false)

    I forgot to lock the column reference's with the $

    I Also added a condition to make sure that column A isn't empty, give it a shot and let me know

    -Edit-

    Added the red colored text to better explain myself
    Last edited by dredwolf; 12-01-2012 at 07:06 PM.

  8. #8
    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 a Formula

    Self Deleted, double post

  9. #9
    Registered User
    Join Date
    12-01-2012
    Location
    British Columbia, Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Conditional Formatting based on a Formula

    Awesome SOLVED!

  10. #10
    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 a Formula

    Cool!
    Hope it was my answer, but as long as your happy, it's all good

+ 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