itsmehar
asked on
Alternate row color based on column value
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Rgonzo1971,
Your suggestion works, but it only highlights the first column. How do i apply it ot the entire row.
Your suggestion works, but it only highlights the first column. How do i apply it ot the entire row.
If you apply two conditional formats as in the article I attached, then use paintbrush to apply this formatting to the whole sheet, or wherever you want.
Not for points
To make Rgonzo's suggestion work for the whole row set the "applies to" range to encompass all columns and then change formula to
=$E2
regards, barry
To make Rgonzo's suggestion work for the whole row set the "applies to" range to encompass all columns and then change formula to
=$E2
regards, barry
Technique 1: Apply shading to alternate rows by using conditional formatting
One way to apply shading to alternate rows in your worksheet is by creating a conditional formatting rule. This rule uses a formula to determine whether a row is even or odd numbered, and then applies the shading accordingly. The formula is shown here:
=MOD(ROW(),2)=0
1.On the worksheet, do one of the following:
To apply the shading to a specific range of cells, select the cells you want to format.
To apply the shading to the entire worksheet, click the Select All button.
One way to apply shading to alternate rows in your worksheet is by creating a conditional formatting rule. This rule uses a formula to determine whether a row is even or odd numbered, and then applies the shading accordingly. The formula is shown here:
=MOD(ROW(),2)=0
1.On the worksheet, do one of the following:
To apply the shading to a specific range of cells, select the cells you want to format.
To apply the shading to the entire worksheet, click the Select All button.
To expand:
You will need two conditional formatting rules after selecting the entire table
The first will require the addition of a column with the formula:
=IF(OR(D2=D3,D2=D1),1,0) (see Attached file)
then create a conditional formatting rule = $F2=1 (Make sure this is the first rule in the rules manager)
The Second as stated above by coachman99 to highlight the alternate rows
Alternate-Row-Formating.xlsx
You will need two conditional formatting rules after selecting the entire table
The first will require the addition of a column with the formula:
=IF(OR(D2=D3,D2=D1),1,0) (see Attached file)
then create a conditional formatting rule = $F2=1 (Make sure this is the first rule in the rules manager)
The Second as stated above by coachman99 to highlight the alternate rows
Alternate-Row-Formating.xlsx
Hello COACHMAN99,
itsmehar doesn't want to apply conditional formatting to alternate rows, he wants the formatting to be applied to alternate groups of rows based on the entry in column D.
bearblack,
Your suggestion doesn't fulfil the requirement either.
As the asker says, Rgonzo's solution works, he just needed it applied to the whole row, which you can do with my suggested adjustment
regards, barry
itsmehar doesn't want to apply conditional formatting to alternate rows, he wants the formatting to be applied to alternate groups of rows based on the entry in column D.
bearblack,
Your suggestion doesn't fulfil the requirement either.
As the asker says, Rgonzo's solution works, he just needed it applied to the whole row, which you can do with my suggested adjustment
regards, barry
the spec says
'highlight the alternate row but if column D is the same it should have the same color'
I assumed this means
1. add alternate shading
2. add additional conditional formatting if column D is same as row above
'highlight the alternate row but if column D is the same it should have the same color'
I assumed this means
1. add alternate shading
2. add additional conditional formatting if column D is same as row above
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I see - thanks
see http://office.microsoft.com/en-ca/excel-help/apply-shading-to-alternate-rows-in-a-worksheet-HA010251644.aspx