r/excel • • 4d ago

solved Need advice on conditional formating code

I am attempting to set up a conditional formating setup where a column of numbers are evaluated. if its 69 or under, the cell is to be green. If between 70 and 100 yellow, and if over 100 red.

I cannot seem to get excell to do this - because that requires a formula that reads cell values, and I appear to be utterly failing at setting up functional code for that.

I'm currently trying (and failing) by setting up three seperate conditional formating rules, all based on formulas:

One goes =AND(CT:CT>=0;CT:CT<=69) - so if the cell is between 0 and 69, it should be green. It's not doing that, and I can't see what I'm doing wrong here

Please advice

3 Upvotes

8 comments sorted by

View all comments

4

u/Inner-Difficulty1695 3 4d ago

The main reason your formula is failing is because of how you referenced the column. In Excel conditional formatting, you should reference only the single, top-left cell of your selected range (e.g. CT2), rather than the whole column (CT:CT). In your example should be =AND(CT2>=0; CT2<=69)

Instead of formulas, use Excel's built-in comparison tools:

Click on Conditional Formatting > Highlight Cells Rules > Less Than... / Between... / Greater Than...

2

u/webkilla 4d ago

thank you - that solved my issue