sense conditional formating

  • Thread starter Thread starter JE McGimpsey
  • Start date Start date
J

JE McGimpsey

One way:

In your IF() formula, use the same condition that the Conditional Format
uses...
 
There is nothing like that built in, why are the colours there in the first
place?
Can you used that as a condition? For example if you colour cells that are
greater than 10 green, then you could use >10 as a condition
Otherwise you need to use a UDF (write code to build your own function)

http://www.cpearson.com/excel/colors.htm


Regards,

Peo Sjoblom
 
To All,

A basic question regarding conditional Formatting.

I can not determine how to perform an IF function based on the color of a
cell. For example, I would like to add a column but exclude any
numbers(values) in that column designated with a color red or green.

Can this be done? How can it be done. I have not found how to do it in HELP.

Thank You,
Greg
 
Thank You
I receive the spreadsheet with the colors set based on human investigation
( I do not know the procedures they use to set some values to red or green).
I have been asked to sum the red values, the green values and the normal
display values.
Where do I find documentation regarding UDF?
Thanks,
Greg
 
Hi Greg,

Try this. Will not work if the colors are a result of conditional
formatting.

Sub ColorCount()
Dim Red3 As Integer
Dim Green4 As Integer
Dim NonColor As Integer
Dim Cell As Range

For Each Cell In Range("Data")
'enter your range or name your range Data
If Cell.Interior.ColorIndex = 3 Then
Red3 = Red3 + 1
ElseIf Cell.Interior.ColorIndex = 4 Then
Green4 = Green4 + 1
ElseIf Cell.Interior.ColorIndex = xlNone Then
NonColor = NonColor + 1
End If
Next

MsgBox " You have: " & vbCr _
& vbCr & " Red " & Red3 _
& vbCr & " Green " & Green4 _
& vbCr & " NonColor " & NonColor, _
vbOKOnly, "CountColor"
End Sub

HTH
Regards,
Howard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top