PDA

View Full Version : Highlighting alternate rows



SUJU
10-10-2005, 07:18 PM
Hi
I have a fairly large data spreadsheet (8 sheets) and want Excel to

automatically color in every alternate row in colorcode 34 for ease of

reading. However, some of the columns are already coloured in other

colors based on their cell values. I need these colors to be superior

to the row color 34. I tried the following Cond Formating way, but the

row color takes superiority...How do i change this? I need the cell value color to be superior

=AND(MOD(ROW(),2),COUNTA($a5:$R200))

Jacob Hilderbrand
10-10-2005, 08:53 PM
Are the other cells colored with Conditional Formatting as well? If so, make sure that the format you want to take priority is listed ahead of the other formats. If the first Conditional Format is True, that format will be applied and the other two Conditional Formats will not be checked.

SUJU
10-10-2005, 08:59 PM
Hi DrJ
No, the other cells are colored based on their numeric value through the Workbook_Open event.....(thats what i am trying to achieve anyways)

thanks.
Suju

TonyJollans
10-11-2005, 12:20 AM
Conditional Formatting will always take precedence over other formatting so, if I understand correctly, you can't do what you're trying (in the way that you're trying it).

Bob Phillips
10-11-2005, 01:58 AM
You could create a UDF like so


Function coloured(cell As Range)
coloured = cell.Interior.ColorIndex <> xlColorIndexNone
End Function


and change your CF formula to

=AND(MOD(ROW(),2),COUNTA($A5:$R200),NOT(COLOURED(A5)))

I am assuming the CF starts in A5.

.