For Each x in Range
Pretty much the same as craig's, if the cell contains a number then it
changes the font color then displays a message box. The actions taken could
be anything. If this is not what you want, then you will have to be more
clear in your goal.
Private Sub Formatter()
Dim c As Range
For Each c In Range("Testrange").Cells
If IsNumeric(c) = True Then
c.Font.ColorIndex = 3 'or whatever
MsgBox "Color Changed" 'or whatever
End If
Next
End Sub
"Craig" wrote in message
...
I'm using Excel 2000. I have a range that I'm iterating through (For Each
x
in Range...). If there is a number in the range, then I would like to
change
certain characteristics of that particular cell (font, color, etc.) and
then
have some other actions take place.
Is there a way to reference a particular cell this way (the only way I can
think of is to NOT use the For Each method, and instead, literally select
each cell in the range and use the Activecell.Offset method to advance to
the
next cell, etc. I'd prefer to not have to do it this way, though.
Any ideas? Thanks for any and all help.
--
Craig
|