PC Review


Reply
Thread Tools Rate Thread

All cell contents within a range of cells turns white if Sheet1!A1 =1

 
 
Michael Lanier
Guest
Posts: n/a
 
      5th Dec 2009
If the return of Sheet1!A1 = 1, I need all fill, font and line colors
to turn white from A1:E10. If the value of Sheet1!A1 changes to 0,
all colors must return to normal. Does anyone have any thoughts on
this? Thanks for any suggestions.

Michael
 
Reply With Quote
 
 
 
 
Gord Dibben
Guest
Posts: n/a
 
      5th Dec 2009
If your range to format is on Sheet1.............

Conditional Formatting

Select A1:E10

Format>CF>Formula is: =$A$1=1 Format to suit

If range to format is on a sheet other than Sheet1

Select Sheet1!A1 and give it a name..............insert>name>define

On other sheet select range A1:E10 and Format>CF

Formula is =myname=1 where myname is your defined name for Sheet1!A1


Gord Dibben MS Excel MVP

On Fri, 4 Dec 2009 16:22:04 -0800 (PST), Michael Lanier
<(E-Mail Removed)> wrote:

>If the return of Sheet1!A1 = 1, I need all fill, font and line colors
>to turn white from A1:E10. If the value of Sheet1!A1 changes to 0,
>all colors must return to normal. Does anyone have any thoughts on
>this? Thanks for any suggestions.
>
>Michael


 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      5th Dec 2009
Copy this code to your worksheet code module:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
Set rng = Sheets("Sheet1").Range("A1:A10")
If Not Intersect(Target,rng) Is Nothing Then
If Sheets("Sheet1").Range("A1") = 1 Then
With rng
.Interior.ColorIndex = 2
.Font.ColorIndex = 2
.Borders.ColorIndex = 2
End With
End If
If Sheets("Sheet1").Range("A1") = 0 Then
With rng
.Interior.ColorIndex = xlNone
.Font.ColorIndex = xlAutomatic
.Borders.ColorIndex = xlAutomatic
End With
End If
End If
End Sub



"Michael Lanier" <(E-Mail Removed)> wrote in message
news:9c77a171-3ddd-4bc4-915b-(E-Mail Removed)...
> If the return of Sheet1!A1 = 1, I need all fill, font and line colors
> to turn white from A1:E10. If the value of Sheet1!A1 changes to 0,
> all colors must return to normal. Does anyone have any thoughts on
> this? Thanks for any suggestions.
>
> Michael



 
Reply With Quote
 
Michael Lanier
Guest
Posts: n/a
 
      5th Dec 2009
Thanks to you both for your help. I'll try things out over the
weekend.

Michael
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete contents of cells in a range based on value of a cell Michael Lanier Microsoft Excel Programming 2 25th Apr 2010 06:51 PM
Populate growing range of cells from Sheet1 to Sheet2 Brad Microsoft Access Getting Started 2 21st Jul 2009 05:19 PM
Create a Macro to Range Cells, from the contents of another Cell. Denis Lory Microsoft Excel Programming 1 11th Apr 2008 10:16 AM
How do I copy the contents of a range of text cells and paste into one cell? davfin Microsoft Excel Misc 7 4th Jul 2006 08:16 AM
Adding contents of one cell to a range of cells. =?Utf-8?B?Q0xKaW5WQQ==?= Microsoft Excel Worksheet Functions 1 10th Feb 2005 10:19 PM


Features
 

Advertising
 

Newsgroups
 


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