View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default conditional format rage based on entries within range

Instead of CF try this worksheet change event that will color if all TRULY
blank
Right click sheet tabview codeinsert this
'--------
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myrange As Range
Set myrange = Range("b1:d4")
If Intersect(Target, myrange) Is Nothing Then Exit Sub
If Target.Count 1 Then Exit Sub
If Len(Application.Trim(Target)) < 1 Then
Application.EnableEvents = False
Target = ""
Application.EnableEvents = True
End If
If Application.CountA(myrange) = 0 Then
myrange.Interior.ColorIndex = 3
Else
myrange.Interior.ColorIndex = -4142
End If
End Sub
'=======
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Simon" wrote in message
...
I have a spreadsheet in excel 2003 where a range of cells contain different
text.

If there is no text in any of the cells within the range I would like the
range conditionally formated (red), however if any or all of the cells
within
the range contain text then no format should be applied;e.g.

If A1 to D1 are blank format cells red, when text is entered into B1
remove
formatting.

All help greatly recieved.
Simon.