ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Conditional Format Cells containing formula (https://www.excelbanter.com/excel-programming/341714-conditional-format-cells-containing-formula.html)

JB2005

Conditional Format Cells containing formula
 
Hi Team,

What conditions do we use to format cells with values (numeric) calculated
using formulae from those that have values not derived from formulae?

Thanks for your help/advice.

Regards


Norman Jones

Conditional Format Cells containing formula
 
Hi JB,

Try something like:

'=============
Sub Tester()
Dim rng As Range

On Error Resume Next
Set rng = Cells.SpecialCells(xlCellTypeFormulas, xlNumbers)
On Error GoTo 0

If Not rng Is Nothing Then rng.Interior.ColorIndex = 6

End Sub
'<<=============


---
Regards,
Norman



"JB2005" wrote in message
...
Hi Team,

What conditions do we use to format cells with values (numeric) calculated
using formulae from those that have values not derived from formulae?

Thanks for your help/advice.

Regards




David McRitchie

Conditional Format Cells containing formula
 
Hi aliased "JB2005" ,
Don't know that I understand the question, but Conditional Formatting
works the same whether the value is derived from a constant or from a
formula. A Conditional Formatting formula returns True or False
(an error is treated as False).

If you have a problem with C.F. you might check that
- the formulas used was based on the active cell address
- the selection of cells when entering formula are the cells that are to be colored
- the use of a mixture of text and numbers might mess up test with ISNUMBER(address)
- the formula also works from on the spreadsheet itself because you are using
Worksheet formulas in your C.F.

More information on Conditional Formatting
http://www.mvps.org/dmcritchie/excel/condfmt.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"JB2005" wrote
What conditions do we use to format cells with values (numeric) calculated
using formulae from those that have values not derived from formulae?




JB2005

Conditional Format Cells containing formula
 
Cell values in a column are either;

derived from formaula (to represent forecast)
entered as values (to reflect actuals - replace the formula)

I just want to format the cells differently, so its easy to identify
forecast from actual values....

"David McRitchie" wrote:

Hi aliased "JB2005" ,
Don't know that I understand the question, but Conditional Formatting
works the same whether the value is derived from a constant or from a
formula. A Conditional Formatting formula returns True or False
(an error is treated as False).

If you have a problem with C.F. you might check that
- the formulas used was based on the active cell address
- the selection of cells when entering formula are the cells that are to be colored
- the use of a mixture of text and numbers might mess up test with ISNUMBER(address)
- the formula also works from on the spreadsheet itself because you are using
Worksheet formulas in your C.F.

More information on Conditional Formatting
http://www.mvps.org/dmcritchie/excel/condfmt.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"JB2005" wrote
What conditions do we use to format cells with values (numeric) calculated
using formulae from those that have values not derived from formulae?





David McRitchie

Conditional Format Cells containing formula
 
Hi "JB2005",
Along the lines of your other answer but using Conditional Formatting
look for topic " Cells with Formulas: " in
http://www.mvps.org/dmcritchie/excel/condfmt.htm
---

"JB2005" wrote...
Cell values in a column are either;

derived from formaula (to represent forecast)
entered as values (to reflect actuals - replace the formula)

I just want to format the cells differently, so its easy to identify
forecast from actual values....




JB2005

Conditional Format Cells containing formula
 
Got it - Many Thanks.
:-)

"David McRitchie" wrote:

Hi "JB2005",
Along the lines of your other answer but using Conditional Formatting
look for topic " Cells with Formulas: " in
http://www.mvps.org/dmcritchie/excel/condfmt.htm
---

"JB2005" wrote...
Cell values in a column are either;

derived from formaula (to represent forecast)
entered as values (to reflect actuals - replace the formula)

I just want to format the cells differently, so its easy to identify
forecast from actual values....






All times are GMT +1. The time now is 01:41 AM.

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