Conditional Formatting & Find/Replace

A

Aspen

I would like to make any cell on a worksheet that is a number (no matter what the value) a certain color. And on that same spreadsheet I would like to identify all cells that are formatted yellow and change them to another color. Thanks as always for your timely and accurate responses.
 
F

Frank Kabel

Hi
for the first one try the folowing
- select your cells (assumption you start this range in A1)
- goto 'Format - Conditional format'
- enter the fomurla
=ISNUMBER(A1)
- choose your cell format

For the second one try the following macro (changes all yellow cells to
red)

Sub change_yellow_color()
Dim Rng As Range
Dim cell As Range

If Selection.Rows.Count > 1 Then
Set Rng = Selection
Else
Set Rng = ActiveSheet.UsedRange
Rng.Select
End If
For Each cell In Rng
If cell.Interior.ColorIndex = 6 Then
cell.Interior.ColorIndex = 3
End If
Next

Application.ScreenUpdating = True
End Sub
 
J

JMay

Frank:
I see you use only the "Application.ScreenUpdating = True" without the
Application.ScreenUpdating = False Preceding it ever.. Can you comment
to clear my "?";
Thks,
 
F

Frank Kabel

JMay said:
Frank:
I see you use only the "Application.ScreenUpdating = True" without
the Application.ScreenUpdating = False Preceding it ever.. Can you
comment to clear my "?";
Thks,

Hi
now comes a real good explanation :)
Copy+Paste error / Rest of and old function I used as basic for this
posting
 
Top