

To close the Format cells window click Ok, the cells with values greater than 90 would be colored dark blue as you choose the color format. To drop down the list for formats click Custom Format, click the Fill tab, and click on the blue dark fill color that you want. In the Greater Than window, you have to delete the value that appears in the box, and then select the cell reference, in this example $I$6, or input specific value that is the lowest limit for you. On the Excel Ribbon’s Home tab, click Conditional Formatting, to format the values greater than a specific one, select Highlight Cells Rules and then choose the option Greater Than.
Change cell background color word 2000 code#
There are as many possibilities for what criteria to use for the formatting as there are project managers in the world.įor example, inserting this For…Next loop into the above code in place of the existing loop will format the task text based on the SV (Schedule Variance). These other arguments may be useful when you design your own formatting macros. You can also specify bold, italics, font name, and font size. While the Font method can accept several arguments that allow you to control many aspects of the font, the above macro uses only the color argument.

The Font method used in the above macro takes several arguments that control the font properties of the specified text. The Font method can communicate deadlines Then we would set up the other Cases below that and specify the formatting we wanted. We could change the first line of the Select…Case to evaluate Percent Complete rather than Cost. We could customize the macro to evaluate any field and format the text according to that field’s values. Would you like to receive more advice and ideas about MS Project? Sign up for TechRepublic’s MS Project TechMail now to receive Brian Kennemer’s daily tipsheet. In this way, we can give our Cost thresholds and specify the colors we want for each cost level. If the Cost field meets the criteria, then the code on the lines just below that Case will be run. Each of these statements lays out criteria against which the value of the Cost field should be compared.

Change cell background color word 2000 series#
Next, there are a series of four Case statements. The line that reads “Select Case tskT.Cost” is setting up which field the rest of the statement will be evaluating. The result is that certain code will run depending upon which of the criteria the field meets. The Select…Case statement is perfect for this kind of macro because it allows the user to specify a field and then to specify different criteria. SelectRow Row:=tskT.ID, RowRelative:=False Based on certain thresholds, it will tell Project what color to make the task. It uses the Select…Case statement to evaluate the Cost field. Here is a macro that will color the task text based on the Task Cost field value.
