> >I have a row with a bunch of numbers from 1 to 10.
> > I need a macro (or something) that colours the cell
[quoted text clipped - 29 lines]
>
> Rick
Yes, you can apply Conditional Formatting across multiple rows, multiple
columns and both multiple rows and multiple columns together. I'm not 100%
sure about what you are asking (what is EG:E4?), but let me take a guess.
You want to highlight two different things in **each** row... the maximum
value and those values that are equal to the value in column E of the same
row. Because the format for these will be different, you will need to decide
how to handle the situation when a cell contains a value that is equal to
the value in column E of the same row and that value also happens to be the
maximum in the row also.
Here is what I came up with. The maximum value(s) will be highlighted in
red, the value(s) equal to the the value in column E of the same row will be
highlighted in green and those cells that are both a maximum and equal to
the column E value will be hatched in the colors red and green.
Okay, select all the cells from column M through column AP and down for as
many rows as you will need to eventually handle. With the range selected (do
it so M1 is the highlighted cell in this range), click on
Format/ConditionalFormatting in Excel's menu bar. Click the Add button twice
on the dialog box that appears (so that you will see three "Conditions"
listed. In the first combo box in each condition, select "Formula Is". Put
these formulas into the indicated "Conditions"...
Condition 1: =AND(M1=$E1,M1=MAX($M1:$T1),$M1<>"")
Condition 2: =AND($M1=MAX($M1:$T1),$M1<>"")
Condition 3: =AND($M1=$E1,$M1<>"")
Next, click the Format button for Condition 1, click the Patterns tab on the
dialog box that appears and select a cross-hatch pattern and (while the
pattern dialog is open) pick a light red color for the cross-hatch color;
then click OK and pick a light green color from the Cell shading area for
the cell's background color; finally, click OK to lock in that format. Next,
click the Format button for Condition 2 and pick the same light red color
you used in Condition 1; then click OK. Do the same for Condition 3, but
this time select the same light green color you used in Condition 1. Once
you have finished that, click OK on the Conditional Formatting screen and
the cells you highlighted will color in as I describe in the beginning of
this process.
Rick
> Can this be done with multiple rows? I have a spreadsheet that is finding
> the
[quoted text clipped - 45 lines]
>>
>> Rick