Forum Discussion
ballatoma
Nov 06, 2024Copper Contributor
Cells font color based on input formula in Excel
Hi! I would like to change the font color of the cells of row "K" based on the input formula. For example if the formula is=$C$2*J9 then the font color of cell "K9" should be blue, if the formula is...
- Nov 06, 2024
Hi ballatoma
Provided you run Excel >/= 2016. Cond. Format rule with formula, for Blue font:
=ISNUMBER( SEARCH( "$C$2", FORMULATEXT( K9 ) ) )
NB: not clear what your 1st row of data is, so adjust K9 if necessary
Then setup a 2nd rule for Red font similarly changing $C$2 with $E$2
AND as "Its a big table" don't forget to check the box Stop if true next to the 1st rule
Martin_Angosto
Nov 06, 2024Iron Contributor
Select all rows from column K, go to Conditional formatting on the home tab of the ribbon, select new rule and then "use a formula to determine which cells to format".
Assuming the only distinction between formatting in blue or red is by containing $C$2 or $E$2 respectively;
Input the following formulation for blue formatting:
=ISNUMBER(SEARCH("$C$2";FORMULATEXT(K9)))
And this one for red formulation:
=ISNUMBER(SEARCH("$E$2";FORMULATEXT(K9)))
- ballatomaNov 06, 2024Copper Contributor
Thank You!
Working perfectly!