Forum Discussion
Sebas2335
Jul 11, 2022Copper Contributor
How to condition cells that have a formula, not a value in Excel?
I have one sheet where I track my monthly household income and costs. Column A contains the description of the costs, starting at row 3. Column C is the month January, column D is February, until column I which is July.
From column M (January) to S (July), I have the income listed. Column L contains the text where the income came from. Each month has in row 31 the total for which I used =SUM formula to get the total of the above column.
I then used the =IMSUB(M31,C31), in this case to compare the costs and income for January to see if we got some leftover or spend more then we made.
Ok, I like to make it more visible by formatting the cells with the IMSUB formulas to be red when below 0 and green when above 0. How do I do that?
I saw different videos about conditional formatting but all are based on the cell containing a value, not a formula.
Thank you for your help
Sebas2335 Firstly, why use IMSUB? That function is used to calculate with imaginary numbers and it returns a text. Just use =M31-C31, of if you want =SUM(-C31,M31)
Conditional formatting looks at the value of the cell. That can be one that is entered directly or one resulting from a formula. Your attempts failed as you tried to format the textual outcome of IMSUB based on numerical criteria.
2 Replies
Sort By
- Riny_van_EekelenPlatinum Contributor
Sebas2335 Firstly, why use IMSUB? That function is used to calculate with imaginary numbers and it returns a text. Just use =M31-C31, of if you want =SUM(-C31,M31)
Conditional formatting looks at the value of the cell. That can be one that is entered directly or one resulting from a formula. Your attempts failed as you tried to format the textual outcome of IMSUB based on numerical criteria.
- Sebas2335Copper ContributorThat worked great. Thank you for the explanation, used the wrong formula. Cheers!