As outlined there are some fairly major limitations using the standard CELL function and as mentioned the VBA route would warrant a cell by cell iteration given the format rather than value takes precedence (at least AFAIK).
Martin raises the point that the XLM GET.CELL call will return more info. but this is still in effect VBA though you can utilise via Names rather than via VBE (or via 3rd party add-in as advised).
(note: XL2007 onwards use of XLM calls will necessitate file be saved as .xlsm)
For ex. - using your sample file - with B1 the active cell you can create the following Defined Names:
Name: _meformat
RefersTo: =GET.CELL(7,B1)
Name: _a1format
RefersTo: =GET.CELL(7,$A$1)
Name: _a2format
RefersTo: =GET.CELL(7,$A$2)
With B1:G6 highlighted you can amend your rules to:
=_meformat=_a1format
=_meformat=_a2format
That said there are still some fairly major limitations to this approach - most notable of which is the fact that altering the explicit format of a cell is a non-volatile action.
Until such time as a volatile action is performed (thereby invoking a calculation) it follows that the Conditional Formatting rules will not re-evaluate.
Bookmarks