bj_duncan — 2008-11-02T16:21:20-05:00 — #1
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?
If cell > 0.1%
then background colour = green
background colour = red
bluedreamer — 2008-11-02T17:55:31-05:00 — #2
I remember doing this with macros but from memory formulas themsleves can't alter formatting.
rushiku — 2008-11-02T18:17:16-05:00 — #3
It's called 'Conditional Formatting', here's how to do it.
bj_duncan — 2008-11-02T21:13:19-05:00 — #4
Cheers thanks very much rushiko, fantastic resource. Many thanks.
limotek — 2008-11-04T06:26:26-05:00 — #5
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.
bj_duncan — 2008-11-04T06:44:41-05:00 — #6
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.
limotek — 2008-11-04T07:33:43-05:00 — #7
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.
bj_duncan — 2008-11-04T19:14:38-05:00 — #8
Cheers thanks. I will keep my eye out and if I come across anything I will PM you with the details.