View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
rdwj rdwj is offline
external usenet poster
 
Posts: 95
Default Retain Conditional Format When Condition Is No Longer Valid

Sub Set_Formatting()

'set start points
Range("A1").Select

'Create loop, as long as the cell contains an entry
While ActiveCell < ""

'create function that determines weather to format or not
' in this case if the cell to the right 3
If ActiveCell.Offset(0, 1) 3 Then

'apply formatting, in this case yellow background
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
End If

'go to the next cell (one cell down)
ActiveCell.Offset(1, 0).Range("A1").Select

'go back to loop
Wend
End Sub


"Rob" wrote:

Rob - thanks! Ugh...macros...not one of my strengths! I'm able to write the
formatting piece - but I could use a little help with editing it to compare.
Can you assist? Thanks!!

"rdwj" wrote:

not with conditional formatting !
When you delete B, the condition disappears, hence your formatting disappears.

What you can do is create a simple VB macro that formats A based on B. In
that way it becomes independent from B and hence if you delete B the format
stays.

I suggest that you record a macro to record the kind of formatting you want
in cell A, the edit the macro. If you need more help, let us know.
RDWJ (also Rob...)

"Rob" wrote:

I would like to compare range A to range B net out differences using
conditional formatting - differences shown in bold red font. How do I retain
range A with the result format when range B is deleted? I'm using Excel
2003. Thanks!