Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default ***Cell Shading (Fill Color)***

Hi all,

I need some help. I'm looking for a way to do this. I have columns with
formulas. And sometimes those formulas in a particular cell or 2 are
overwritten with a "hard" number. Is it possible to somehow make it so that
when someone changes the cell to a number that it turns the cell yellow
automatically?

Please help.

Thank you!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default ***Cell Shading (Fill Color)***

Why not just train people not to do that?

You could write some complicated VBA code that checks the content of a
cell to see if it contains hard coded values. In the Worksheet_Change
Event, it could act as a realtime monitor. There are also some
spreadsheet auditing programs that can do this for you. Check out:
http://arxiv.org/ftp/arxiv/papers/0803/0803.0169.pdf



HTH,
JP

On Jul 14, 2:55*pm, Steve wrote:
Hi all,

I need some help. *I'm looking for a way to do this. *I have columns with
formulas. *And sometimes those formulas in a particular cell or 2 are
overwritten with a "hard" number. *Is it possible to somehow make it so that
when someone changes the cell to a number that it turns the cell yellow
automatically?

Please help.

Thank you!!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ***Cell Shading (Fill Color)***

You can let your users type away and still prevent them from changing the
cells a specified range. For example...

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 4 Then
On Error GoTo Done
Application.EnableEvents = False
Application.Undo
End If
Done:
Application.EnableEvents = True
End Sub

will prevent the user from making a change to anything (formulas or
constants) in Column D. Simply change the If-Then test to cover whatever
range you need it to cover.

Rick


"Steve" wrote in message
...
Hi all,

I need some help. I'm looking for a way to do this. I have columns with
formulas. And sometimes those formulas in a particular cell or 2 are
overwritten with a "hard" number. Is it possible to somehow make it so
that
when someone changes the cell to a number that it turns the cell yellow
automatically?

Please help.

Thank you!!


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default ***Cell Shading (Fill Color)***

I would have thought the most obvious thing to do, if user should not change
the cell at all, is to protect the sheet with those cells locked. However if
user is allowed to amend formulas you could use Conditional formats.

First select cell A1 ( * important * )
Ctrl-F3, Define name
Name: NotFormula
Refersto: =LEFT(GET.CELL(41,A1),1)<"="

Select your Formula cells you want coloured if they are changed to a non
formula, ie do not start with an "="

Format, Conditional formats, select "Formula Is" in the left dropdown and
this formula
=NotFormula

(I'm sure there must be some simpler function to indicate if the cell is a
formula, but off the top of my head I can't think what it might be).

Regards,
Peter T



"Steve" wrote in message
...
Hi all,

I need some help. I'm looking for a way to do this. I have columns with
formulas. And sometimes those formulas in a particular cell or 2 are
overwritten with a "hard" number. Is it possible to somehow make it so

that
when someone changes the cell to a number that it turns the cell yellow
automatically?

Please help.

Thank you!!



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
Count if a cell has color shading robnsd Excel Discussion (Misc queries) 3 April 23rd 23 03:46 AM
Cell shading reverts to No Fill John Excel Discussion (Misc queries) 0 May 2nd 08 04:43 PM
Cell Color Shading Changing bmwcoke Excel Discussion (Misc queries) 0 July 12th 07 01:22 PM
How to add fill colors (cell shading) in EXCEL? Donna Sherman Excel Discussion (Misc queries) 2 April 21st 05 07:24 PM
cell color shading stacydoo Excel Discussion (Misc queries) 1 December 10th 04 07:44 AM


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

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"