Maintenance Notification: We are upgrading our servers today so you may experience intermediate outages. Thank you for your patience.
Apply advanced conditional formatting and filtering
MO-211

Create conditional formatting rules that use formulas

  1. 1Select the whole range, starting from the first data row: A2:D6.
  2. 2Home › Conditional Formatting › New Rule › Use a formula to determine which cells to format.
  3. 3Type the formula for the first row: =$B2="Late".
  4. 4Format: the fill. OK, OK.

The formula is written for the top-left cell of the selection and must be TRUE where the format belongs. The $ before B keeps every cell in a row looking at column B.

What the MO-211 task asks

Seven of our ten MO-211 practice exams have one, almost always a whole-row highlight: “Create a conditional formatting rule on A4:G31 that uses a formula to fill the whole row with the light red FFC7CE when the Status column equals Overdue.”

Some need two conditions: “a formula rule on A4:F19 filling amber FFEB9C where Occupancy is under 40% and the film still has more than 3 shows a week. Both conditions must hold.” That is AND inside the formula.

Our grader checks that the rule is a formula rule over the task's range with the task's fill, and that it shades exactly the right rows. A rule that shades the wrong rows, or only one column, fails the second check.

Worked examples

Set up the grid below to follow along. Each example starts from it as shown; every result is what Excel showed.

Orders
ABCD
1OrderStatusQtyDue
2A-1Paid49-Dec-2025
3A-2Late1219-Mar-2026
4A-3Paid927-Jun-2026
5A-4Late25-Oct-2026
6A-5Open1524-Nov-2026
A whole row
Do this
  1. 1Select A2:D6, A2 active. New Rule › Use a formula: =$B2="Late". Fill light red. OK.
Excel showsRows 3 and 5 (A-2 and A-4) shaded across A to D

Every cell in row 3 tests B3, because $B is locked and the 2 moves down a row at a time.

Two conditions
Do this
  1. 1Same range: =AND($B2="Late",$C2>10). Fill amber.
Excel showsRow 3 only (A-2: Late, 12)

A-4 is late but has a quantity of 2, so AND is FALSE. With OR instead, rows 3, 5 and 6 would be shaded.

No $ at all
Do this
  1. 1Same range: =B2="Late".
Excel showsOnly A3 and A5 shaded

Each cell tests the cell one column to its right: A3 tests B3, but B3 tests C3. Lock the column.

Both parts locked
Do this
  1. 1Same range: =$B$2="Late".
Excel showsNothing shaded

Every cell tests B2, which says Paid. Leave the row number free.

The formula written for the wrong row
Do this
  1. 1Same range, A2 active: =$B3="Late".
Excel showsRows 2 and 4 shaded, one row above the late ones

The formula belongs to the active cell, A2, so it must name row 2.

In the video
Do this
  1. 1Select A2:D6. New Rule › Use a formula: =$B2="Late". Fill FFC7CE.
Excel showsRows 3 and 5 shaded across A to D

The first example, done in Excel on the same sheet.

Watch it done in Excel

The last example above, recorded in real Excel on the same grid.

Exam traps

The $ in the wrong place

For a whole row, lock the column and not the row: =$B2. =B2 shades one column, and =$B$2 tests the same cell for every row.

Selecting from the heading

With A1:D6 selected and A1 active, =$B2="Late" shades rows 2 and 4. Start the selection on the first data row, or write the formula for the active cell's row.

A formula that returns a number

Any number but 0 counts as TRUE. =C2-10 on the Qty cells shades all five, because none of them is exactly 10. Write a comparison, such as =C2>10.

A colour that is nearly right

Our tasks give the fill as a hex code, such as FFC7CE. Set it under Format › Fill › More Colors, not from the nearest swatch.

FAQ

Does capitalisation matter in the text?

No. =$B2="late" shades the same rows as =$B2="Late".

Why not use Highlight Cells Rules?

A Highlight rule formats only the cell it tests. To shade the whole row, or to test two columns at once, you need a formula.

Can the formula use functions?

Yes, any that return TRUE or FALSE, such as AND, OR and NOT, or a comparison with one inside it, such as =$D2<TODAY() for due dates that have passed.

New to this?

This page covers what the exam asks. For the full how-to, read our guide on dfwexcel.com.

Highlight rows with a formula — dfwexcel.com

Try it under exam conditions

Take a full, timed MO-211 practice exam, upload the workbook you built, and get a score out of 1000 with a per-task breakdown of where the points went. Your first one is free.

No credit card needed.