Can a Conditional Formatting Formula Be Stored in a Cell/Cells on the Spreadsheet and Still Work?

MEUserII

Board Regular
Joined
Oct 27, 2017
Messages
91
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
  5. 2013
Platform
  1. Windows
I would like to know if it's possible to store a conditional formatting formula in a cell/cells on the spreadsheet, and still have it work?

For example, consider the cells:
Column AColumn B
Row 11A
Row 2B2
Row 33C
Row 4D4

<tbody>
</tbody>

If the formula:=ISNUMBER(A1) is entered with condition: fill - yellow as a conditional formatting formula where the range in the conditional formatting rule is set to A1:B4 then the effect will be the following fill effect (fill effect denoted in brackets).

Column AColumn B
Row 1[YELLOW][NO COLOR]
Row 2[NO COLOR][YELLOW]
Row 3[YELLOW][NO COLOR]
Row 4[NO COLOR][YELLOW]

<tbody>
</tbody>

However, this requires that the conditional formatting formula is stored in the Conditional Formatting Rules Manager, so the question is this: is there a way to have this conditional formatting formula stored on the spreadsheet in some cell or cells, and still have the conditional formatting effect (fill yellow) of the conditional formatting formula work for range A1:B4 without being directly stored in the Conditional Formatting Rules Manager?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
My first question is why?
 
Upvote 0
The big question is, why do you want to do it this way? In order to use Conditional Formatting, you will need to use Conditional Formatting rules (no way around that).

If you did not want to store the Conditional Formatting Formulas in Conditional Formatting, you could store the formula in cells, and then apply the Conditional Formatting Rules, but that would still be a formula, in an of itself.

For example, let's say that you store the =ISNUMBER(A1) formula to cell C1.
Then you would select cell A1, and enter the following formula for CF:
Code:
=C1

The caveat to using this method is:
- you are still, in fact, using CF formulas
- you would need to have a separate formula on you worksheets for every single cell that you wanted to apply Conditional Formatting to (i.e. need to enter a formula for A2 in C2, A3 in C3, etc)

The other alternative to not using Conditional Formatting at all is to use VBA.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top