Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how do i ignore cells with font color?
I just cannot get my code to do what i want. I hope someone can help me. I am trying to get it to loop through all the values in the range and color the font of certain low values. The way i think it would work best is if it could just ignore the values that it already has colored because as it stands, i can only get it to see one low value per range. my question is: how can i get it to ignore font without the default black? for example blue or red font. here is a snippet of code for that portion of the program.. MUCH thanks for your assistance, because right now it's in an endless loop. AHHHH! grubb = Cells(J + K, "V").value tlow = Cells(J + K, "T").value thigh = Cells(J + K, "U").value While tlow grubb 'code to ignore cells with color font color other than default black since i would like it to color all the tlow values greater than the grubb value. If ActiveCell.Font.ColorIndex < xlAutomatic And ActiveCell.Font.ColorIndex < 1 Then Set rng = Range("D" & J + K, "N" & J + K) lowval = Application.WorksheetFunction.Min(rng) result = Application.Match(lowval, rng, 0) If Not IsError(result) Then rng(1, result).Font.Color = RGB(0, 10, 200) minValue = Application.WorksheetFunction.Min(Range(rng)) 'should return minimum value without the cells with colored font tlow = (Cells(J + K, "R").value - minValue) / (Cells(J + K, "S").value) 'calc new tlow for the "when" condition End If Wend ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do i ignore cells with font color? | Excel Programming | |||
how do i ignore cells with font color? | Excel Programming | |||
how do i ignore cells with font color? | Excel Programming | |||
how do i ignore cells with font color? | Excel Programming | |||
how do i ignore cells with font color? | Excel Programming |