rows.com

Your conditional formatting rules: ensuring they apply to the right cells

Conditional formatting can sometimes seem unpredictable, especially when it doesn't behave as expected.

3 min readMicrosoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Homeschooling means you don't have a teacher to tap on the shoulder when the spreadsheet does something you didn't ask for. You watched the video. You followed the steps. And still, your conditional formatting seems to land on random cells instead of the ones you targeted. That's frustrating, but it's also a sign that the logic behind the rule, not your execution, is the real culprit. The good news is that one small distinction separates "works perfectly" from "applied randomly," and once you see it, you'll stop guessing.

Conditional formatting with formulas is a game of relative references. When you write a rule for cell A1 and then apply it to a range, the formula shifts for every cell in that range, unless you lock certain parts with dollar signs. A user is trying to color product names based on whether column E is less than 5. If the rule is applied to a column of product names but the formula references E1 without locking the column, it will check the cell immediately to the right of each product name, not the fixed column E. That explains the randomness: the rule is checking different columns as it moves down the range. The video likely showed the formula in one cell but never clarified that the dollar signs change where the rule looks.

For the second task, coloring whole rows based on whether column P contains "WAAR", the same logic applies, but now you need an absolute column reference. The formula should lock column P by writing `$P1` so that every cell in the row looks at the same column P value. Without the dollar sign, the rule would check column Q for the second cell, column R for the third, and so on. What feels like random coloring is actually the spreadsheet doing exactly what you told it: checking the cell in the same relative position, not the fixed column you intended.

Here is the practical fix: write your formula once in the top-left cell of the selection you want to format. If the condition must always read from column E, make the column reference absolute by adding a dollar sign before the E. If the row should change as the rule moves down, leave the row number relative. Test on a single row first. Once the first row formats correctly, apply the rule to the whole range. You will see the pattern snap into place. The spreadsheet is not being random. It is being literal. Your job is to speak its language of dollar signs and relative positions.

From Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

This is for school (homeschooling. I don't have access to quick or direct contact with a teacher, which is why I'm here). I've received a video of instructions for how conditional formatting works, and I feel like I'm doing what was in the video. But the formatting seems to get applied randomly.

Here, I need to colour the product name based on if column E is less than 5

Read the original at Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community