ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how do i ignore cells with font color? (https://www.excelbanter.com/excel-programming/281469-how-do-i-ignore-cells-font-color.html)

chick-racer[_19_]

how do i ignore cells with font color?
 

I am stuck once again.

Your help is always greatly appreciated!

I would like my program to go thru my range of 11 cells and ignore the
cells that are already colored. I have it looping back until condition
is met.
How do i get it to ignore cells that have been colored blue? I just
want it to look at the cells with default black font.

Here is a small bit of code from the program....

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
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

Wend


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/



All times are GMT +1. The time now is 09:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com