View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Isito Isito is offline
external usenet poster
 
Posts: 5
Default How to check if one of the conditions returns "true"?

I use the formatting in many cells and check many many different conditions.

I would check conditions instead of checking if any of them have been met.
Unfortunately my macro would be probably 20 pages long if I use this
approach.

Thank you anyways :)



"Gary''s Student" wrote:

Plagiarize the logic used in the conditional format. Just make VBA use the
same test(s) as the conditional formatting equations.
--
Gary's Student


"Isito" wrote:

I use conditional formatting to highlight cells with wrong data. I want to
write a macro to check if any conditions are met. However even if the cell
has green highlight the macro still "sees" it as white i.e. the color of the
cell if conditional formatting conditions are false.

For example if the "usual" color of the cell is white (2) and in case I
enter number "1" it becomes green (35) even if I can see that it is green,
macro does not. If I try to use the following line in macro:
If Activecell.Interior.ColorIndex=35 then goto green else goto white
I will be directed to white: not green:

So, if anyone knows how to check that the conditions have been met please,
PLEASE teach me, I need your help very much.



Thanks