+ Reply to Thread
Results 1 to 6 of 6

conditional formatting across a whole sheet

  1. #1
    Registered User
    Join Date
    08-18-2010
    Location
    Worcester
    MS-Off Ver
    Excel 2007
    Posts
    11

    conditional formatting across a whole sheet

    Hi. I would like to know if I can format a whole sheet easily.

    If the value in the cells column 1-6 is below the value in Target it needs to go red, = to needs to be amber and above needs to be green. I can do it a column or row at a time but not sure how to do it for a whole sheet where each row compares it to a different target in column A.

    Can anyone help me please!!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: conditional formatting across a whole sheet

    Let's go with your example. Select D2:S6

    With Excel, you write the equation as it would be for the first cell in your range and Excel will automatically update the references as it goes through your range (if you let it).
    So for Red
    =A2<D2 at it's simplest. However, you don't want blank cells to show up either so
    =AND(A2<D2, ISNUMBER(D2))
    But when Excel examines E2 (for example) the conditional formatting would change to
    =AND(B2<E2,ISNUMBER(E2)) which you don't want. You need to anchor the column (but not the row for Column A)
    Therefore, the final formula would be
    =AND($A2<D2,ISNUMBER(D2))
    Any questions? Set up the other two similarly. (You won't need the AND or ISNUMBER for the other two)
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: conditional formatting across a whole sheet

    Hi ChemistB,

    Your formula =AND($A2<D2,ISNUMBER(D2)), causes a circular reference, and would it not be better to change it to =AND($A2<=D2,ISNUMBER(D2)) ? That is if I can figure out how to aplly it without creating a circular reference.

  4. #4
    Registered User
    Join Date
    09-02-2011
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: conditional formatting across a whole sheet

    Hi andyr86,

    As an extra thought, you can make the conditional formatting go as far as you want across the sheet to the right, if you so desire - you mentioned formatting a 'whole sheet' a couple of times.

    Select rows 2 to 6 and go to Conditional Formatting. Create a new formula rule as

    Please Login or Register  to view this content.
    and tick 'Stop if True'.

    Then create three more formula rules below this rule in the hierarchy.

    Please Login or Register  to view this content.
    This will carry on formatting as far to the right as there is a number present.
    I've just tested this on mine and it works fine.

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: conditional formatting across a whole sheet

    Hi AndyR85,

    Have a look at Sheet 3 of Book1 in the attached folder
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: conditional formatting across a whole sheet

    Putting those types of formulas into Conditional Formatting does not cause circular references although I did make an error and it should be
    =AND($A2>D2,ISNUMBER(D2))
    Take a look at attachment
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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