Conditional formatting, entire row based
Use the "indirect" function on conditional formatting.
- Select Conditional Formatting
- Select New Rule
- Select "Use a Formula to determine which cells to format"
- Enter the Formula,
=INDIRECT("g"&ROW())="X"
- Enter the Format you want (text color, fill color, etc).
- Select OK to save the new format
- Open "Manage Rules" in Conditional Formatting
- Select "This Worksheet" if you can't see your new rule.
- In the "Applies to" box of your new rule, enter
=$A$1:$Z$1500
(or however wide/long you want the conditional formatting to extend depending on your worksheet)
For every row in the G column that has an X, it will now turn to the format you specified. If there isn't an X in the column, the row won't be formatted.
You can repeat this to do multiple row formatting depending on a column value. Just change either the g
column or x
specific text in the formula and set different formats.
For example, if you add a new rule with the formula, =INDIRECT("h"&ROW())="CAR"
, then it will format every row that has CAR
in the H Column as the format you specified.
=$G1="X"
would be the correct (and easiest) method. Just select the entire sheet first, as conditional formatting only works on selected cells. I just tried it and it works perfectly. You must start at G1 rather than G2 otherwise it will offset the conditional formatting by a row.