Not easily ... you could possibly write an Excel VBA function to do this ... BUT ... Excel 97 and above have a condition format capability that will automatically format a cell based on a set of user entered rules
By selecting a cell or group of cells, format rules, can be applied under FORMAT Conditional Formatting.
example:
setup a total column
highlight the column
select Conditional Formatting
Set the first rule as: greater then 0 with Pattern fill Green
Add a new rule and set to: Less then 0 with Pattern fill Red
Add a new rule and set to: equal 0 (don't change any formats)
now the column of cells will follow whatever value exists in the cells;
anything < 0 will turn the cell red
0 will be no color change
> 0 will be Green
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.