+ Reply to Thread
Results 1 to 3 of 3

Use Conditional Formatting to Shade Several Cells Based on Value of One Cell

  1. #1
    Registered User
    Join Date
    12-14-2011
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    2

    Use Conditional Formatting to Shade Several Cells Based on Value of One Cell

    Project1.jpg

    Hi,

    I have set up a simple spreadsheet which shows me how many staff I have on at any particular time. I require to shade boxes so I can see how many staff there are so for example if I have 2 staff on, 2 boxes in the column should be shaded. I have been trying to do conditional formatting for this but the only way I can get it working is to format each cell indiviually which is extremely time consuming. Is there a way to paste the conditional format but amend it automatically.

    Not sure I have explained this very well so have attached an image of the spreadsheet. The value in row 2 is the number that gets changed and hopefully the shaded cells in the colums will correspond with that number.

    Thanks
    Last edited by greenie256; 12-17-2011 at 08:16 AM.

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

    Re: Use Conditional Formatting to Shade Several Cells Based on Value of One Cell

    I am not sure if your sample is representative of actual expected results... You say that row 2 determines how many cells should be shaded, yet some don't seem to coincide with that rule....

    Assuming the sample is wrong and you actually want the cells coloured based on number in row 2.. then select the range from B4 to U and last row...

    Go to Home|Conditional Formatting and select New Rule.

    Select "use a formula to determine which cells to format" and then enter formula: =ROWS(B$4:B4)<=B$2

    Click Format and choose colour from Fill tab.

    Click Ok

    Click Ok to finish
    Attached Files Attached Files
    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
    12-14-2011
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Use Conditional Formatting to Shade Several Cells Based on Value of One Cell

    Thank you so much, that has done the trick.

    Going to save me a lot of time (and errors!!).

    Thanks again.

+ 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