+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Conditional formatting based on multiple criteria

  1. #1
    Registered User
    Join Date
    01-20-2011
    Location
    Arizona
    MS-Off Ver
    Excel 2007
    Posts
    3

    Conditional formatting based on multiple criteria

    Hello, I was hoping someone could help me with a conditional formatting question in Excel 2007.

    A little background: once a week we use some third party software to pull data from our database and create an inventory report in Excel. This report has multiple lines for each item in inventory and followed by totals on every 15th row. This sheet will generally be about 10,000 rows long.

    I tried to color code this report to make it easier on myself to quickly scan through by highlighting the relevant columns and conditional formatting based on numerical ranges (i.e. red if less than or equal to zero, yellow from 0 to 10, red if greater). The problem is that this highlights a lot more than what i need and makes it even more difficult to scan through quickly.

    So what i ended up doing was to highlight every 15th row using a formula in conditional formatting [=AND(MOD((ROW()-1),15)=0) --ROW()-1 because the first row is headings]. This highlights just the totals on every 15th row, but the problem is, now i can't figure out how to get the value of each cell to format based on numerical ranges.

    Is something like this even possible?

    Thanks in advance for all of your help.

    Summary: I want to highlight every 15th row of data red if <= 0, yellow if between 0 and 10, and green if >= 10.

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

    Re: Conditional formatting based on multiple criteria

    You have to make 3 different conditional formulas now, and for each add to the AND (which you didn't need if it was just the one condition, btw)

    e.g

    =AND(MOD((ROW()-1),15)=0,$A$1<=0)

    =AND(MOD((ROW()-1),15)=0,$A$1>0,$A$1<10)

    =AND(MOD((ROW()-1),15)=0,$A1>=10)

    assuming column A is being tested for the data condition.
    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
    Registered User
    Join Date
    01-20-2011
    Location
    Arizona
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Conditional formatting based on multiple criteria

    Wow, thanks for getting back to me so quickly.

    A couple of things:

    First, I included the AND because I knew there would be multiple conditions, I just didn't know what else to include I guess, so thanks for filling in the blanks in my excel knowledge.

    Second, I would be using this for columns K through Y, so is there a way highlight them all at once and use one master formula? Or do i have to go through each column and make the appropriate changes each time? I tried a couple of things but couldn't seem to figure this one out either.

    You are a life-saver! Thanks again.

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

    Re: Conditional formatting based on multiple criteria

    You can use the formula I gave as "master formulas" after you have selected columns K to Y. You would need to replace the $A1 reference to the top-most cell reference of your select where the criteria is to be searched and matched..

    The conditional formatting will adjust the 1 in $A1 to match row you are in... the A will remain the same vertically and horizontally because of the $ in front.
    Last edited by NBVC; 01-20-2011 at 01:11 PM.

  5. #5
    Registered User
    Join Date
    01-20-2011
    Location
    Arizona
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Conditional formatting based on multiple criteria

    Awesome! Thanks again for all of your help.

+ 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