ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional Formating for Formula Cells (https://www.excelbanter.com/excel-discussion-misc-queries/47729-conditional-formating-formula-cells.html)

Andrew Heath

Conditional Formating for Formula Cells
 
Hi to all fantastic Excel champions,

How do I get conditional formatting to change the format of any cell that
contains a formula?


Kind regards
--
Andrew 'The Ox' Heath
Brisbane, QLD
Australia

David McRitchie

Hi Andrew,

You can use a user defined function (see my formula.htm page):
But it must be in the same workbook not your personal.xls to work
in Conditional Formatting, though there is no harm in having it in both places.

Function HasFormula(cell)
HasFormula = cell.HasFormula
End Function

=hasformula(a1)

use the above in your conditional formatting
http://www.mvps.org/dmcritchie/excel/condfmt.htm

If you need help to install a User Defined Function or a Macro see
http://www.mvps.org/dmcritchie/excel/getstarted.htm

alternative:
You can temporarily see which cells have formulas with Ctrl+A, Edit, GoTo,
[Special], Formulas, (check all: Numbers, Text, Logicals, Errors)
You could then use Format,cells, pattern to color the cells.
---
HTH,
David McRitchie, Microsoft MVP - Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm

"Andrew Heath" (delete) wrote in message ...
Hi to all fantastic Excel champions,

How do I get conditional formatting to change the format of any cell that
contains a formula?


Kind regards
--
Andrew 'The Ox' Heath
Brisbane, QLD
Australia




Bernd Plumhoff

Hello Andrew,

define the name HasFormula with the value
=GET.CELL(48,INDIRECT("RC",))

(go to Insert/Name/Define... and enter HasFormula into field Names in
workbook and
=GET.CELL(48,INDIRECT("RC",))
into field Refers to)

then select for example your whole workbook (left mouse-click on upper left
cell of sheet), go to Format/Conditional Formatting, select Formula Is for
Condition 1 and enter
=HasFormula
into next field, push button Format and select Pattern and the green color,
for example)

All cells with formulas will appear with a green background now.

Other interesting parameters for the get.cell() function you might find at
http://www.sulprobil.com/html/get_cell.html

HTH,
Bernd


All times are GMT +1. The time now is 10:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com