ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how do i shade cells that contain a formula (https://www.excelbanter.com/excel-discussion-misc-queries/21495-how-do-i-shade-cells-contain-formula.html)

peter

how do i shade cells that contain a formula
 
It seems like it should be possible to do this with conditional formatting,
but i can't find a function that detects whether a cell contains a formula.
any help on this is much appreciated. thanks.



Peo Sjoblom

You would need a UDF for that, nothing built in


http://www.mvps.org/dmcritchie/excel/formula.htm



Regards,

Peo Sjoblom

"peter" wrote:

It seems like it should be possible to do this with conditional formatting,
but i can't find a function that detects whether a cell contains a formula.
any help on this is much appreciated. thanks.



peter

Thanks much,

The HasFormula function on that link did the trick.

Peter


"Peo Sjoblom" wrote:

You would need a UDF for that, nothing built in


http://www.mvps.org/dmcritchie/excel/formula.htm



Regards,

Peo Sjoblom

"peter" wrote:

It seems like it should be possible to do this with conditional formatting,
but i can't find a function that detects whether a cell contains a formula.
any help on this is much appreciated. thanks.



Gord Dibben

peter

Paste this UDF to a general module in your workbook.

Function IsFormula(Cell)
Application.Volatile
IsFormula = Cell.HasFormula
End Function

FormatConditional FormattingFormula is: =IsFormula(A1)

Pick a pattern and OK your way out.

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.


Gord Dibben Excel MVP



On Mon, 11 Apr 2005 12:51:04 -0700, "peter"
wrote:

It seems like it should be possible to do this with conditional formatting,
but i can't find a function that detects whether a cell contains a formula.
any help on this is much appreciated. thanks.



pom15595

how do i shade cells that contain a formula
 
http://j-walk.com/ss/excel/usertips/tip045.htm

"peter" wrote:

It seems like it should be possible to do this with conditional formatting,
but i can't find a function that detects whether a cell contains a formula.
any help on this is much appreciated. thanks.




All times are GMT +1. The time now is 06:57 AM.

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