Can a formula change background colour in excel?

G’day to all,

I am currently working on an excel spreadsheet and I have formula working out a difference of 2 columns.

Can a formula result change the background colour depending on the result given?

E.G:
If cell > 0.1%
then background colour = green
else
background colour = red

I remember doing this with macros but from memory formulas themsleves can’t alter formatting.

It’s called ‘Conditional Formatting’, here’s how to do it.

Cheers thanks very much rushiko, fantastic resource. Many thanks.

I remember doing the same. The one thing I could never figure out was how to change the background colour other cells that do not contain the value (e.g. changing the background colour of an entire row based on one value in that row). If you happen to figure it out, I’d appreciate it if you’d let me know.

The only way I was able to make the whole row format was to merge all the cells, but that only permits one result in the merged cell.

Don’t know if this helps or not, but I couldn’t work any other way as the conditional formatting does not allow you to select the particular cells you want formatted, it only allows you to use the cell that has been selected to do the formatting on.

I thought so. Thanks for the reply.

I’m sure someone has come up with some long winded way of doing it maybe through VB.

Good luck with the rest of your project.

Cheers thanks. I will keep my eye out and if I come across anything I will PM you with the details.