Forum Discussion
Excel Contitional formating
- Jun 17, 2022
mgalbert515gmailcom Then I misinterpreted your question. Excel has a function ISFORMULA and you can use that in a CF rule. Something like this:
mgalbert515gmailcom Short answer. Yes you can!
- mgalbert515gmailcomJun 17, 2022Copper Contributor
- mathetesJun 17, 2022Gold Contributor
To underscore the "Yes" you've gotten from Riny_van_Eekelen here's an image that demonstrates Conditional Formatting for a series of cells, each of which has a formula like the one that appears at the top of the image, a convoluted INDIRECT function itself. In this case, the formula that appears is what's in cell A4.
And then the coloring of the text and the background in each cell so produced is based on several different values that might be present, each of which yields its own color scheme. You can create conditional formatting rules based on the value of the cell itself or based on values in other cells.
(I'll warn you that creating and applying conditional formatting rules can be tricky at times; I often find I have to go through several attempts at getting the syntax right before it works, but I can assure you that it's very possible to do what you've asked.)
- Riny_van_EekelenJun 17, 2022Platinum Contributor
mgalbert515gmailcom Have you looked here?
Let's say you want to colour a cell red if it has the value 20. It doesn't matter if the cell contains the number 20 or a formula that results in the number 20.
- mgalbert515gmailcomJun 17, 2022Copper ContributorOops, sorry.
Not quite what I'm looking for. I want to color a cell red or whatever if that cell contains a formula as apposed to a value. Cell B7 contains (=if (A1="X","Y","N") not if the cell has a value like (X).