Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional formatting...How do I know cell status?

Status
Not open for further replies.

DiegoErnesto

Programmer
Nov 28, 2001
41
EC
Hi.

I have a excel workbook that contain cells with many different conditional format, and I have a macro that scroll all cells but I can not recognize individual status cell (ColorIndex: Red or Green) and take different walk.

Thanks...
 
Hi DiegoErnesto,

Correct, you cannot do that.

You must use the same conditions in code as you use in the conditional formatting. It is possible, but VERY awkward, to interrogate the conditional formulae in your own code - FAR better just to code the same thing in two places (your macro and the CF condition).

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
You have to play either with Interior or Font.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
See the FormatConditions collection in the help section.
 
Hi, again...

Try, with below code, but not work with conditional format, only common format...

For Each singleCell In Range("Data").Cells
InteriorColor = singleCell.Interior.Color
MsgBox Str(InteriorColor)
Next

if you will have another idea...

Bye, bye and thanks...
 
Hi DiegoErnesto,

Conditional Format colours do NOT show in any cell properties.

You should use the conditions themselves - and best if you just copy them. They are in the FormatConditions Collection - as jcrater says - but interpreting them is not easy.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top