conditional formatting colour

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Conditional Formatting- - colour coding

Conditional Formatting- - colour coding

resolvedResolved · High Priority · Version 2010

Sophie has attended:
Excel Intermediate course

Conditional Formatting- - colour coding

Please can you help me. I have created a spreadsheet, and have added condtional formatting to the first column of my spreadsheet, which I have data validated (I choose from the drop down list what priority my work is, and this changes the colour of that cell). I want the 6 cells to the right of it to change the same colour (so when I select done of the drop down list in the first column and it turns green, the next 6 rows will also change green). How do I do this?

Thank you!

RE: Conditional Formatting- - colour coding

Hi Sophie

The trick to making this work is to apply a formula based conditional format and then check to see if the absolute reference in the formula needs to be amended to allow you to apply the format across all rows of your list.

For example: In a row that has three cells as follows:

A1 B1 C1
OK 9 1/3/2013

We might want the conditional formatting for A1 to A3 go green when the status in A1 is OK.

Highlight Cells A1 to C1

From the Home ribbon, click Conditional Formatting
From the menu that appears choose New rule
From the dialogue box that opens click the bottom option:
"Use a formula to determine which cells to format"

Click into the the box labelled
"Format values where this formula is true"

Click into cell A1 as this contains the value that will trigger the formatting.
The formula will appear in the dialogue box.

=$A$1

Complete it as follows
=$A$1="OK"

The formula automatically has dollar symbols included. In other words it assumes the references must be absolute.
This is not helpful for us as this format will be copied to other rows. Remove the dollar symbol before the reference to row 1.
=$A1="OK"

Lastly click the format button to decide the formatting that should apply if the condition is true. You might decide to set the pattern to be green and the Font to White and Bold so it stands out.

Click OK and you should now find that the cells A1 to C1 go green with white text when A1 contains the text OK. With anything else in A1 the text reverts back to normal.

Now Click on one of the cells that contain this new conditional format rule (either A1, B1 or C1) and click the format painter button on the left side of the Home Ribbon (looks like paint brush). You can now "paint" this conditional format over any other records in your database (e.g. A2 through to C2, A3 to C3 and so on).

Because we removed the dollar symbol from before the row number in the Conditional formula Excel will test the contents of the current row in column A, not just the first row.


I hope this helps. I realise this is quite a long answer - do let me know if you have any questions.


Kind regards,
Andrew

RE: Conditional Formatting- - colour coding

Hi Andrew,

Thats great, thank you very much for your help!

Sophie


 

Excel tip:

Change the Value of a Constant

When using a named constant in a worksheet, you may wish to change the value of that constant.

From the 'Insert' menu, select 'Name', then select 'Define'.

In the 'Define Name' dialog box, select the constant that you want to change.
Change the value in the 'Refers To' box.
Click OK.

Wherever that named constant has been used it will now use its new value.

View all Excel hints and tips


Server loaded in 0.08 secs.