Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Conditional Formatting for Changing a Formula

Hi,
I'd like a cell to change color when a user has entered a hard-coded number
rather than the keeping the formula already in the cell.
Any ideas?

Thanks,
Heather
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Conditional Formatting for Changing a Formula

See this:

http://groups.google.com/group/micro...cf859ecd?tvc=2

--
Biff
Microsoft Excel MVP


"HeatherT" wrote in message
...
Hi,
I'd like a cell to change color when a user has entered a hard-coded
number
rather than the keeping the formula already in the cell.
Any ideas?

Thanks,
Heather



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Conditional Formatting for Changing a Formula

Hi,

You can use a VBA macro:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim isect As Range
Set isect = Application.Intersect(Target, Range("A1"))
If Not isect Is Nothing Then
If IsNumeric(Target) And Not Target.HasFormula And Target < "" Then
Target.Interior.ColorIndex = 6
End If
End If
End Sub

Since you are asking for a method to change the cell color when there is a
hard coded NUMBER entered in the cell, not when the cell is cleared or when a
text entry is made, then the above macro will do what you want.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"HeatherT" wrote:

Hi,
I'd like a cell to change color when a user has entered a hard-coded number
rather than the keeping the formula already in the cell.
Any ideas?

Thanks,
Heather

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Conditional Formatting for Changing a Formula

Thanks to all ... all seemed similar to answer I found somewhere else and
ended up using.

Created a general module in VBE for the workbook:
Function IsFormula(Cell)
IsFormula = Cell.HasFormula
End Function

Then used conditional formatting:
CF-Formula Is-=NOT(IsFormula(CellRef))

Hope that helps for others as well!

Heather


"HeatherT" wrote:

Hi,
I'd like a cell to change color when a user has entered a hard-coded number
rather than the keeping the formula already in the cell.
Any ideas?

Thanks,
Heather

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 for changing data Mariliz Excel Discussion (Misc queries) 4 November 6th 08 06:27 PM
Dynamically Copying Changing Conditional Formatting sdm New Users to Excel 0 September 5th 08 05:42 PM
Conditional formatting: changing number format Almir Vargas[_2_] Excel Worksheet Functions 3 March 22nd 08 05:33 PM
Changing text color usinf a formula (NOT Conditional Formatting) John Elliott Excel Discussion (Misc queries) 7 June 11th 06 07:30 AM
Changing a Formula in Conditional Formatting Dee Excel Worksheet Functions 1 November 2nd 05 04:30 PM


All times are GMT +1. The time now is 12:51 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"