Hi Kenny,
See
http://www.mvps.org/dmcritchie/excel/event.htm#case
For the formulas you can go through the formula on an
Worksheet_calculate event and the inside would look something like:
instead of selection you would use your range or cells. for the
entire sheet -- you would be limited to formulas.
Dim CurrCell As Range
On Error Resume Next 'in case nothing in selection
For Each CurrCell In Selection.SpecialCells(xlFormulas)
CurrCell.Formula = Trim(CurrCell.Formula)
Next
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages:
http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page:
http://www.mvps.org/dmcritchie/excel/search.htm
"Kenny" wrote in message ...
I would like to have VB code that will test each cell in an entire column
(everytime the worksheet is recalculated, if that is not too time-consuming)
and fill the cell with a different color based upon the string in the cell.
The possible string values are Red, Yellow, Green, Blue, Black, Grey, Purple.
The fill color would correspond to the string value.
I can't seem to get the hang of it. Any help would be appreciated. Thanks in
advance to all the great contributors to this forum.