Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
lee lee is offline
external usenet poster
 
Posts: 184
Default Conditional Formatting Based on Cell Content

How do I create conditional formatting based on cell content rather than cell
value? I'm trying to highlight cells with different colors for cells that
contain constants vs. formulas.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 461
Default Conditional Formatting Based on Cell Content

Not sure if this helps because it doesn't do it in an ongoing basis, but if
you highlight all the cells and go to

Edit--GoTo (Or just press Ctrl + G)
Then click on Special
Then click the box that says formulas and then ok

Now all the cells with formulas in them are hilighted and you can change all
the cells properties from there.

As far as conditional formatting goes, im not sure

"Lee" wrote:

How do I create conditional formatting based on cell content rather than cell
value? I'm trying to highlight cells with different colors for cells that
contain constants vs. formulas.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
lee lee is offline
external usenet poster
 
Posts: 184
Default Conditional Formatting Based on Cell Content

I'm trying to set up a spreadsheet for another user so that it automatically
highlights the cell for them when a formula is overwritten with a constant,
so I was really trying to avoid having the user manually change the format.
Is it possible to incorporate your suggestion into a macro in combination
with the conditional formatting feature?

"akphidelt" wrote:

Not sure if this helps because it doesn't do it in an ongoing basis, but if
you highlight all the cells and go to

Edit--GoTo (Or just press Ctrl + G)
Then click on Special
Then click the box that says formulas and then ok

Now all the cells with formulas in them are hilighted and you can change all
the cells properties from there.

As far as conditional formatting goes, im not sure

"Lee" wrote:

How do I create conditional formatting based on cell content rather than cell
value? I'm trying to highlight cells with different colors for cells that
contain constants vs. formulas.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,073
Default Conditional Formatting Based on Cell Content

On Apr 24, 7:11 am, Lee wrote:
I'm trying to set up a spreadsheet for another user so that it automatically
highlights the cell for them when a formula is overwritten with a constant,
so I was really trying to avoid having the user manually change the format.
Is it possible to incorporate your suggestion into a macro in combination
with the conditional formatting feature?

"akphidelt" wrote:
Not sure if this helps because it doesn't do it in an ongoing basis, but if
you highlight all the cells and go to


Edit--GoTo (Or just press Ctrl + G)
Then click on Special
Then click the box that says formulas and then ok


Now all the cells with formulas in them are hilighted and you can change all
the cells properties from there.


As far as conditional formatting goes, im not sure


"Lee" wrote:


How do I create conditional formatting based on cell content rather than cell
value? I'm trying to highlight cells with different colors for cells that
contain constants vs. formulas.


Hi Lee,

Excel's worksheet functions do not include a function to test for the
presence of a formula. However, VBA has such a method called
HasFormula. So, if you write a User Defined Function (UDF) using the
HasFormula method you can then use it in the conditional formatting
Formula Is box...

Example UDF...

Public Function NowText(Range As Range) As Boolean
If Not Range.HasFormula Then NowText = True
End Function

Then, say you are wanting to test A1 for formula, then in the
conditional Formatting Formula Is box use =NowText(A1) and set the
format.
If A1 has a formula, NowText(A1) = False and the conditional
formatting is NOT applied. If A1s formula has been overwritten then
NowText(A1) = True and the conditional formatting is applied.

The UDF can either be pasted into your Personal Macro Workbook or a
standard code module.

Ken Johnson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
conditional formatting one cell based on content of another cell Chris Adolph Excel Discussion (Misc queries) 3 June 6th 07 06:52 PM
Conditional formatting formula that uses VLookup, based on content of another cell Fred Excel Discussion (Misc queries) 2 August 3rd 06 10:38 AM
Conditional formatting formula that uses VLookup, based on content of another cell Fred Excel Discussion (Misc queries) 3 August 2nd 06 04:23 PM
Conditional Formatting if cell content is a formula oldsambvca Excel Worksheet Functions 2 June 6th 06 10:24 PM
Conditional cell background formatting, based on cell content nosivad Excel Discussion (Misc queries) 5 February 11th 06 11:12 PM


All times are GMT +1. The time now is 05:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"